Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian d1b54dc2c5 1.231.3 2023-07-25 05:05:09 +02:00
DebaucheryLibrarian b9c3efa24e Tracking image campaign clicks in umami. 2023-07-25 05:05:05 +02:00
4 changed files with 19 additions and 4 deletions

View File

@ -1,6 +1,7 @@
<template> <template>
<iframe <iframe
v-if="campaign?.banner?.type === 'html'" v-if="campaign?.banner?.type === 'html'"
ref="iframe"
:width="campaign.banner.width" :width="campaign.banner.width"
:height="campaign.banner.height" :height="campaign.banner.height"
:src="getSource(campaign)" :src="getSource(campaign)"
@ -15,6 +16,8 @@
:href="campaign.url || campaign.affiliate?.url" :href="campaign.url || campaign.affiliate?.url"
target="_blank" target="_blank"
class="campaign" class="campaign"
data-umami-event="campaign-click"
:data-umami-event-campaign-id="`${campaign.entity.slug}-${campaign.id}`"
> >
<img <img
:src="getSource(campaign)" :src="getSource(campaign)"
@ -217,4 +220,17 @@ export default {
max-height: 100%; max-height: 100%;
max-width: 100%; max-width: 100%;
} }
.frame-container {
position: relative;
font-size: 0;
}
.frame-target {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
</style> </style>

View File

@ -259,7 +259,6 @@ function initUiActions(store, _router) {
} }
async function fetchCampaign(context, campaignId) { async function fetchCampaign(context, campaignId) {
console.log(campaignId);
const { campaign } = await graphql(` const { campaign } = await graphql(`
query Campaign( query Campaign(
$campaignId: Int! $campaignId: Int!

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.231.2", "version": "1.231.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "traxxx", "name": "traxxx",
"version": "1.231.2", "version": "1.231.3",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@casl/ability": "^5.2.2", "@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.231.2", "version": "1.231.3",
"description": "All the latest porn releases in one place", "description": "All the latest porn releases in one place",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {