Skip to content

Commit

Permalink
fix: adjust event name
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSnow committed Feb 7, 2024
1 parent 5bc473e commit 13bd832
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/LeakyPaywall.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const isOverFreeLimit = computed(() => paywall.value.read.length >= config.value
useTrackLink(
computed(() => foundArticle.value?.element),
(href) => ({
event: 'article.link_clicked',
event: 'article.link_click',
properties: {
// Impossible to be null
article_id: foundArticle.value?.id ?? '',
Expand Down Expand Up @@ -136,7 +136,7 @@ whenever(
whenever(
isScrollOverThreshold,
() => {
sendTrack('paywall.reached', {
sendTrack('paywall.reach', {
pathname: location.value.pathname ?? '',
article_id: foundArticle.value?.id ?? null,
client_id: config.value.clientId,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/tracking-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import * as z from 'zod'
import { articleScrollBack } from './tracking-schema/article-scroll-back'
import { articleView } from './tracking-schema/article-view'
import { pageView } from './tracking-schema/page-view'
import { paywallReached } from './tracking-schema/paywall-reached'
import { paywallReached } from './tracking-schema/paywall-reach'
import { userSignIn } from './tracking-schema/subscriber-signin'
import { articleLinkClicked } from './tracking-schema/article-link-clicked'
import { articleLinkClicked } from './tracking-schema/article-link-click'
import { paywallDisplay } from './tracking-schema/paywall-display'

// We must import 1 by 1 or we will lost the type info here
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from 'zod'

export const articleLinkClicked = defineTrackEvent({
event: 'article.link_clicked',
event: 'article.link_click',
properties: {
pathname: z.string(),
client_id: z.string(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from 'zod'

export const paywallReached = defineTrackEvent({
event: 'paywall.reached',
event: 'paywall.reach',
properties: {
pathname: z.string(),
client_id: z.string(),
Expand Down

0 comments on commit 13bd832

Please sign in to comment.