From 341b9267e61cc3fee5ed3e4c3223fb860fdd85d9 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Mon, 23 Dec 2024 22:29:47 +0100 Subject: [PATCH] Embedding entity information in scene and movie watch buttons. --- pages/movies/@movieId/+Page.vue | 12 ++++++++++-- pages/scene/+Page.vue | 6 ++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pages/movies/@movieId/+Page.vue b/pages/movies/@movieId/+Page.vue index a2af0af..2fcb22a 100644 --- a/pages/movies/@movieId/+Page.vue +++ b/pages/movies/@movieId/+Page.vue @@ -75,12 +75,17 @@ class="button view nolink" >View photos - Watch movie + :data-umami-event="movie.affiliate ? 'watch-click-aff' : 'watch-click'" + :data-umami-event-movie-id="`${(movie.channel || movie.network).slug}:movie:${movie.id}`" + :data-umami-event-aff-id="movie.affiliate && `aff:${movie.affiliate.id}`" + :data-umami-event-channel="movie.channel?.slug" + :data-umami-event-network="movie.network?.slug" + >Watch full movie @@ -311,6 +316,9 @@ const scenes = pageContext.pageProps.scenes; } .watch { + padding: .75rem 2rem; + margin-left: .25rem; + font-size: 1rem; background: var(--primary); color: var(--text-light); } diff --git a/pages/scene/+Page.vue b/pages/scene/+Page.vue index 6d1e988..c432ee6 100644 --- a/pages/scene/+Page.vue +++ b/pages/scene/+Page.vue @@ -113,8 +113,10 @@ rel="noopener" class="button button-primary watch nolink" :data-umami-event="scene.affiliate ? 'watch-click-aff' : 'watch-click'" - :data-umami-event-aff-id="scene.affiliate?.id" - :data-umami-event-scene-id="scene.id" + :data-umami-event-scene-id="`${(scene.channel || scene.network).slug}:scene:${scene.id}`" + :data-umami-event-aff-id="scene.affiliate && `aff:${scene.affiliate.id}`" + :data-umami-event-channel="scene.channel?.slug" + :data-umami-event-network="scene.network?.slug" >Watch full video