diff --git a/services/web/frontend/js/infrastructure/tracking-propensity.ts b/services/web/frontend/js/infrastructure/tracking-propensity.ts index 0392995140..586f00b1bd 100644 --- a/services/web/frontend/js/infrastructure/tracking-propensity.ts +++ b/services/web/frontend/js/infrastructure/tracking-propensity.ts @@ -6,10 +6,6 @@ import { const { propensityId } = getMeta('ol-ExposedSettings') -if (propensityId) { - createTrackingLoader(() => loadPropensityScript(propensityId), 'Propensity') -} - const loadPropensityScript = (id: string) => { insertScript({ src: 'https://cdn.propensity.com/propensity/propensity_analytics.js', @@ -21,3 +17,7 @@ const loadPropensityScript = (id: string) => { }, }) } + +if (propensityId) { + createTrackingLoader(() => loadPropensityScript(propensityId), 'Propensity') +}