posthog.com
posthog.com copied to clipboard
Tutorial - Setting up cross domain tracking
Strapline
Explain the idea in a sentence or two
Setting up cross domain tracking
Why should we do it?
how it will it be useful or interesting for readers/viewers
Lots of discussions and questions on how to do it (see links in outline). It is something users have to implement themselves because PostHog doesn’t officially support it. Helps users maximize their usage of PostHog.
Outline
Bullet point outline of structure / questions / topics to be covered
- What is cross domain tracking?
- Cross domain tracking is when tracking data travels from one domain to another, for example [posthog.com](http://posthog.com) to app.posthog.com
- It is important to keep track of your users throughout the full extent of their journey
- We don’t do it because google will penalize you and adblocks will try to block you.
- Lots of sites track you all over the place with cross domain cookie
- Ways to cross domain track
- Automatically: https://posthog.com/docs/integrate/client/js#website-vs-app (is this true? it’s old)
- Only works for autotracking
- Pass session ID (or anon id) in URL: https://posthog.slack.com/archives/C02E3BKC78F/p1656067083434739
- Use iframe: https://posthog.slack.com/archives/C02E3BKC78F/p1666002269316819
- Allow them to be anon and identify later
- Automatically: https://posthog.com/docs/integrate/client/js#website-vs-app (is this true? it’s old)
Worth checking with @timgl if you haven't already as I believe he has the most context about what exactly the latest is with cross domain tracking?