@playpilot/tpi 8.9.0 → 8.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editorial.mount.js +8 -8
- package/dist/link-injections.js +1 -1
- package/dist/mount.js +6 -6
- package/package.json +1 -1
- package/src/lib/enums/TrackingEvent.ts +1 -0
- package/src/routes/components/Explore/Routes/ExploreHome.svelte +2 -1
- package/src/routes/components/Explore/Routes/ExploreResults.svelte +2 -1
- package/src/routes/components/Modals/TitleModal.svelte +5 -1
- package/src/routes/components/TitlePopover.svelte +5 -1
- package/src/routes/components/TrackingPixelsForTitleDataPerLink.svelte +3 -1
package/package.json
CHANGED
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
try {
|
|
37
37
|
return (await fetchTitles(params))?.results
|
|
38
38
|
} catch (error: any) {
|
|
39
|
-
|
|
39
|
+
console.log(error)
|
|
40
|
+
track(TrackingEvent.ExploreHomeRailError, null, { message: error.message || error.status.toString() || '', params })
|
|
40
41
|
throw new Error(error)
|
|
41
42
|
}
|
|
42
43
|
}
|
|
@@ -79,7 +79,8 @@
|
|
|
79
79
|
|
|
80
80
|
return response
|
|
81
81
|
} catch (error: any) {
|
|
82
|
-
|
|
82
|
+
console.log(error.status)
|
|
83
|
+
track(TrackingEvent.ExploreResultsError, null, { message: error.message || error.status.toString() || '', params })
|
|
83
84
|
throw new Error(error)
|
|
84
85
|
}
|
|
85
86
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { TrackingEvent } from '$lib/enums/TrackingEvent'
|
|
2
|
+
import { MetaEvent, MetaSource, TrackingEvent } from '$lib/enums/TrackingEvent'
|
|
3
3
|
import { track } from '$lib/tracking'
|
|
4
4
|
import type { TitleData } from '$lib/types/title'
|
|
5
5
|
import { getFirstAdOfType } from '$lib/api/ads'
|
|
6
6
|
import { exploreParentSelector } from '$lib/explore'
|
|
7
7
|
import { onMount } from 'svelte'
|
|
8
|
+
import { isPixelAllowed } from '$lib/pixel'
|
|
9
|
+
import { trackViaPixel } from '@playpilot/retargeting-tracking'
|
|
8
10
|
import Modal from './Modal.svelte'
|
|
9
11
|
import Title from '../Title.svelte'
|
|
10
12
|
import TopScroll from '../Ads/TopScroll.svelte'
|
|
@@ -27,6 +29,8 @@
|
|
|
27
29
|
|
|
28
30
|
track(TrackingEvent.TitleModalView, title)
|
|
29
31
|
|
|
32
|
+
if (isPixelAllowed()) trackViaPixel(MetaEvent.TitleInterest, { title: title.title, source: MetaSource.Link })
|
|
33
|
+
|
|
30
34
|
onMount(() => {
|
|
31
35
|
const openTimestamp = Date.now()
|
|
32
36
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { TrackingEvent } from '$lib/enums/TrackingEvent'
|
|
2
|
+
import { MetaEvent, MetaSource, TrackingEvent } from '$lib/enums/TrackingEvent'
|
|
3
3
|
import { track } from '$lib/tracking'
|
|
4
4
|
import { getFirstAdOfType } from '$lib/api/ads'
|
|
5
5
|
import type { TitleData } from '$lib/types/title'
|
|
6
6
|
import { onMount } from 'svelte'
|
|
7
|
+
import { isPixelAllowed } from '$lib/pixel'
|
|
8
|
+
import { trackViaPixel } from '@playpilot/retargeting-tracking'
|
|
7
9
|
import Popover from './Popover.svelte'
|
|
8
10
|
import Title from './Title.svelte'
|
|
9
11
|
import TopScroll from './Ads/TopScroll.svelte'
|
|
@@ -23,6 +25,8 @@
|
|
|
23
25
|
|
|
24
26
|
track(TrackingEvent.TitlePopoverView, title)
|
|
25
27
|
|
|
28
|
+
if (isPixelAllowed()) trackViaPixel(MetaEvent.TitleInterest, { title: title.title, source: MetaSource.Link })
|
|
29
|
+
|
|
26
30
|
onMount(() => {
|
|
27
31
|
setOffset()
|
|
28
32
|
|
|
@@ -43,9 +43,11 @@
|
|
|
43
43
|
return () => observer.disconnect()
|
|
44
44
|
})
|
|
45
45
|
|
|
46
|
-
function trackPixelsForTitle({ sid, genres, participants, providers }: TitleData): void {
|
|
46
|
+
function trackPixelsForTitle({ sid, genres, participants, providers, title }: TitleData): void {
|
|
47
47
|
previouslyTrackingTitles.push(sid)
|
|
48
48
|
|
|
49
|
+
trackViaPixel(MetaEvent.TitleInterest, { title, source: MetaSource.Link })
|
|
50
|
+
|
|
49
51
|
genres.slice(0, 3).forEach(genre => {
|
|
50
52
|
trackViaPixel(MetaEvent.GenreInterest, { genre: genreData.find(g => g.slug === genre)?.name, source: MetaSource.Link })
|
|
51
53
|
})
|