Skip to content

Commit

Permalink
Have event logged when ad visibility changes
Browse files Browse the repository at this point in the history
  • Loading branch information
misterpekert committed Oct 22, 2023
1 parent ffa72cd commit b3a5fcd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions assets/css/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -539,5 +539,5 @@ label {
// But we can't do that, because of the way that position: fixed locks the z-index of the children. That means the
// effective z-index of the fade and the modal contents is the same. So we do this, which will occasionally overlap
// the modal contents in an annoying way. It would be nice to figure out something better.
z-index: 1056 !important;
}
//z-index: 1056 !important;
}
11 changes: 9 additions & 2 deletions components/ExternalDa.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,17 @@ async function visibilityChanged(visible) {
}
}, 45000)
}
})
}).addEventListener("slotVisibilityChanged", (event) => {
const slot = event.slot;
console.group("Visibility of slot", slot.getSlotElementId(), "changed.");
// Log details of the event.
console.log("Visible area:", `${event.inViewPercentage}%`);
console.groupEnd();
});
window.googletag.enableServices()
})
});
window.googletag.cmd.push(function () {
window.googletag.display(props.divId)
Expand Down

0 comments on commit b3a5fcd

Please sign in to comment.