-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Ajoute le tracking pour la campagne apprentissage (#3363)
* wip: Commit pour review app * style: Fix lint * wip: First draft TikTok * wip: Fix pagename pas reset quand on change de page * wip: Ajoute Azerion * style: lint * fix: Fix csp * fix: Fix pixel présent au changement de page * fix: Ajoute les CSP * wip: Ajoute la régie Xandr pour Amnet * wip: migrate from wandr to custom service for Amnet marketing service * wip: remove Amnet pixel since it's a duplicate with page_view event * wip: add adsrvr script to amnet marketing service * wip: add zemanta script to amnet marketing service Warning: page view event is still fired after choisir-apprentissage page exit * wip: move from zemanta script to pixel tracking * wip: create meta marketing service * wip: Renomme le service Amnet * fix: Fix format CSP * wip: Skip les tests qui manque d'une dépendance pour pouvoir build * wip: Extrait les 3 scripts Amnet dans des services tarteaucitron * wip: Ajoute les cookies utilisés par les différents services * wip: Fix les CSP * wip: "Fix" le tracker Meta * wip: Fix les cookies qui n'étaient pas supprimés pour TikTok et Meta * wip: update Zemanta cookie list * wip: update SeedTag script for tracking * wip: move from meta script to meta pixel img * tests: Fix les dépendances des tests * config: Fix package-lock * refactor: Extrait la gestion du re-trigger dans le cookiesService * wip: Update le wording * style: fix lint --------- Co-authored-by: Florian Leroy <florian.leroy@octo.com>
- Loading branch information
Showing
22 changed files
with
1,750 additions
and
3,512 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// @ts-nocheck | ||
|
||
import type { StorybookConfig } from "@storybook/nextjs"; | ||
const path = require('path'); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,6 @@ export interface CookiesService { | |
allowService(nom: string): void; | ||
|
||
openPanel(): void; | ||
|
||
triggerJobs(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/client/services/marketing/TikTok/tiktok.marketing.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { CookiesService } from '../../cookies/cookies.service'; | ||
import { MarketingService } from '../marketing.service'; | ||
|
||
export default class TiktokMarketingService implements MarketingService { | ||
private static SERVICE_NAME = 'tiktok'; | ||
private static TIKTOK_ID = 'C90RBUPHLSUPN04HH210'; | ||
|
||
private readonly cookiesService: CookiesService; | ||
|
||
constructor(cookiesService: CookiesService) { | ||
this.cookiesService = cookiesService; | ||
this.cookiesService.addService(TiktokMarketingService.SERVICE_NAME); | ||
} | ||
|
||
trackPage(pagename: string): void { | ||
if (pagename === 'off') { | ||
this.cookiesService.addUser('tiktokId', undefined); | ||
} else { | ||
this.cookiesService.addUser('tiktokId', TiktokMarketingService.TIKTOK_ID); | ||
} | ||
} | ||
} |
Oops, something went wrong.