diff --git a/static/to_compile/entrypoints/assistant/script-to-iframe.ts b/static/to_compile/entrypoints/assistant/script-to-iframe.ts index 96cde9357..5ea167d2c 100644 --- a/static/to_compile/entrypoints/assistant/script-to-iframe.ts +++ b/static/to_compile/entrypoints/assistant/script-to-iframe.ts @@ -3,7 +3,8 @@ import { iframeResize } from "iframe-resizer"; const script = document.currentScript as HTMLScriptElement const slug = script?.dataset?.objet; const origin = new URL(script?.getAttribute("src")).origin -const src = `${origin}/${slug || ''}?iframe`; +// TODO: mise en prod, remplacer dechet ci-dessous par une string vide +const src = `${origin}/${slug || 'dechet'}?iframe`; const iframe = document.createElement("iframe"); const iframeAttributes = { diff --git a/static/to_compile/js/controllers/assistant/analytics.ts b/static/to_compile/js/controllers/assistant/analytics.ts index fbebde9a5..473385973 100644 --- a/static/to_compile/js/controllers/assistant/analytics.ts +++ b/static/to_compile/js/controllers/assistant/analytics.ts @@ -91,7 +91,7 @@ export default class extends Controller { this.personProperties.iframe = true } - if (document.referrer) { + if (document.referrer && !document.referrer.includes(document.location.origin)) { this.personProperties.iframe = true } }