Corrige les custom variables pour le tracking
parent
c9504a92c7
commit
0f6e45dace
|
@ -12,7 +12,7 @@ export const INDICATOR = {
|
|||
|
||||
type CustomSiteIndicator = {
|
||||
[INDICATOR.SITE.LANGAGE]: '[fr]' | '[en]' // langage du site (mycompanyinfrance ou mon-entreprise)
|
||||
[INDICATOR.SITE.EMBARQUÉ]: 1 | 0 // intégration externe
|
||||
[INDICATOR.SITE.EMBARQUÉ]: '1' | '0' // intégration externe
|
||||
}
|
||||
type CustomPageIndicator = Record<string, string>
|
||||
|
||||
|
@ -76,9 +76,14 @@ export function createTracker(siteId?: string) {
|
|||
this.customVars.set({
|
||||
site: {
|
||||
[INDICATOR.SITE.LANGAGE]: `[${options.language}]` as '[fr]' | '[en]',
|
||||
[INDICATOR.SITE.EMBARQUÉ]: 0,
|
||||
[INDICATOR.SITE.EMBARQUÉ]: document.location.pathname.includes(
|
||||
'/iframes/'
|
||||
)
|
||||
? '1'
|
||||
: '0',
|
||||
},
|
||||
})
|
||||
this.dispatch()
|
||||
}
|
||||
}
|
||||
return Tag
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
import { IsEmbeddedContext } from 'Components/utils/embeddedContext'
|
||||
import { useContext } from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { Route, Switch } from 'react-router-dom'
|
||||
import { TrackingContext } from '../../ATInternetTracking'
|
||||
import { INDICATOR } from '../../ATInternetTracking/Tracker'
|
||||
import useSimulatorsData from '../Simulateurs/metadata'
|
||||
import SimulateurPage from '../Simulateurs/Page'
|
||||
import IframeFooter from './IframeFooter'
|
||||
|
||||
export default function Iframes() {
|
||||
const simulators = useSimulatorsData()
|
||||
useContext(TrackingContext).customVars.set({
|
||||
site: { [INDICATOR.SITE.EMBARQUÉ]: 1 },
|
||||
})
|
||||
|
||||
return (
|
||||
<IsEmbeddedContext.Provider value={true}>
|
||||
{/** Open external links in the parent frame.
|
||||
|
|
Loading…
Reference in New Issue