Embedding entity information in scene and movie watch buttons.

This commit is contained in:
DebaucheryLibrarian 2024-12-23 22:29:47 +01:00
parent ed8c9a71fa
commit 341b9267e6
2 changed files with 14 additions and 4 deletions

View File

@ -75,12 +75,17 @@
class="button view nolink"
>View photos</button>
<Link
<a
v-if="movie.url"
:href="movie.url"
target="_blank"
class="button watch nolink"
>Watch movie</Link>
: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</a>
</div>
</div>
</div>
@ -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);
}

View File

@ -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</a>
</div>
</div>