overleaf-cep/services/web/app/views/_mixins/foot_scripts.pug
Antoine Clausse 00d5d879c5 [web] Add third-party tracking Propensity (#26638)
* Rename `suppressGoogleAnalytics` to `suppressAnalytics`

* Add Propensity script

* Add LinkedIn Insight Tag script

* Version the cookie to prevent adding unconsented tracking

* Move tracking loaders to Typescript, insert them in foot_scripts.pug

* Show the cookie-banner when tracking other than GA is set

* Revert `oa` cookie versioning

* Remove `async` from propensity script

* Use shared tracking loader for Hotjar, LinkedIn, and Propensity

* Reusable `insertScript`

* Remove tracking-linkedin

* Test the scripts by adding fake ids

* Revert "Test the scripts by adding fake ids"

This reverts commit 50759bb6b40fd2684d1b967d83dd71e8517c3de9.

GitOrigin-RevId: 2a7b36bfc70ac1fc983f837dd4693a19a385cbc6
2025-06-30 08:05:52 +00:00

21 lines
514 B
Text

mixin foot-scripts
each file in entrypointScripts(entrypoint)
script(type='text/javascript' nonce=scriptNonce src=file defer=deferScripts)
if settings.devToolbar.enabled
each file in entrypointScripts('devToolbar')
script(
type='text/javascript'
nonce=scriptNonce
src=file
defer=deferScripts
)
if typeof suppressAnalytics == 'undefined'
each file in entrypointScripts('tracking')
script(
type='text/javascript'
nonce=scriptNonce
src=file
defer=deferScripts
)