-
Story
-
Resolution: Done
-
Critical
-
None
-
None
-
None
We want to add marketing campaign tracking info to Segment pageview tracking. That basically just means: Add 3 new pieces of metadata to the pageview events. Each piece of marketing campaign info will exist either in the URL query string or in a cookie.
For getPageEventOptions we'd want something like:
const getPageEventOptions = () => { const path = window.location.pathname.replace(/^\/beta\//, '/'); const search = new URLSearchParams(window.location.search); // new return [ { path, url: `${window.location.origin}${path}${window.location.search}`, isBeta: isBeta(), module: window._segment?.activeModule, tactic_id_external: search.get('sc_cid') || Cookies.get('rh_omni_tc'), // new tactic_id_internal: search.get('intcmp') || Cookies.get('rh_omni_itc'), // new tactic_id_personalization: search.get('percmp') || Cookies.get('rh_omni_pc'), // new ...window?._segment?.pageOptions, }, { context: { groupId: window._segment?.groupId, }, }, ]; };
- relates to
-
RHCLOUD-24403 Product Analytics: Request to start sending name & email address on events to Segment [pre-prod]
- Closed