Skip to main content

Multiple Domains

  • 5 September 2024
  • 2 replies
  • 59 views

Hi,
I have 15 different content websites on different domains. If I visit first domain example abc.com, I get A123 as anonymous_id but when I visit 2nd domain def.com, I get D987 as anonymous_id. What I want to achieve is for Segment to know, it was me on both domains.
I can use query string for 2 domains but for 15, it gets complicated. Is there a better solution?

 

Thanks,

Hi @Khalid Mahmood - Unfortunately there’s not a better way for segment to know that these domains are interconnected together.  Also for security purposes we don’t necessarily want to pass ids from one website to another. Alternatively, using a subdomain could work for tracking across different sites for example: gap.com is connected to oldnavy.gap.com, bananarepublic.gap.com etc… as long as the domain remains the same, you should be able to use one javascript code that carries throughout. Here’s some helpful documentation around this: https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#cross-subdomain-analytics 


Hi @Chauntel Greaves 
Thanks for coming back. Yeah, I know the subdomain solution but was more interested in cross domain. I can use a solution that creates first party user id in browser of a user but that will be lots of development work. Thought to check if someone from community has faced a similar issue.

 

Thanks


Reply