Skip to main content
Answer

Web Tracking Code on multiple domains?

  • April 7, 2021
  • 3 replies
  • 1609 views

Forum|alt.badge.img+2

Question. Can the website tracking code be placed on two different URLs (one domain, one subdomain), or is it restricted to just one URL? Thank you!

Best answer by Dov

Hi @geneellis,

Thank you for sharing your question with the Klaviyo Community.

In theory, yes you can paste our onsite tracking snippet onto separate URLs. However, I would not recommend doing so for purposes of data integrity. For example, if site A and site B use the same snippet, web tracking data will not flow consistently to account A nor account B. Therefore, if you are operating multiple sites, I recommend using two separate web trackingsnippets - one for each site rather than using the same web tracking snippet for both.

Thanks and have a great day.

3 replies

Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • Answer
  • April 8, 2021

Hi @geneellis,

Thank you for sharing your question with the Klaviyo Community.

In theory, yes you can paste our onsite tracking snippet onto separate URLs. However, I would not recommend doing so for purposes of data integrity. For example, if site A and site B use the same snippet, web tracking data will not flow consistently to account A nor account B. Therefore, if you are operating multiple sites, I recommend using two separate web trackingsnippets - one for each site rather than using the same web tracking snippet for both.

Thanks and have a great day.


Forum|alt.badge.img+1
  • Contributor I
  • May 26, 2021

Hi DD,

 

We have a related question. We have a setup with a main content website like dd.com and a ecommerce subdomain shop.dd.com. We have one klaviyo account for customer marketing. Should we install the same klaviyo snippet on both domains? I think that would make sense and Klaviyo only offers us one API key anyway. Is that the recommended approach? Anything we need to be aware of?


David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • May 26, 2021

Hey @Stefan,

Great question!
Yes, you would just use the same Klaviyo Javascript on this alternate domain. Using that same snippet provided within your Klaviyo account would allow you to trigger the Active Onsite event and to publish signup forms to this secondary website. You can learn more about this from the How to Install Klaviyo.js to Publish Signup Forms article.

Hope this helps!

David