How to track subdomains using AEP Web SDK? | Community
Skip to main content
Level 2
April 1, 2024
Solved

How to track subdomains using AEP Web SDK?

  • April 1, 2024
  • 1 reply
  • 1224 views

Hi everyone,  Can someone suggest what is the best way for tracking 2 subdomains in Adobe Analytics using AEP web SDK? 

I have two domains, www.xyz.com and blog.xyz.com. 

Are the below items considered good practice?

1. I want to use separate launch containers for each domain.(as I have multiple third party marketing pixels for each domain. Maintaining 100s of rules might be difficult)

2. I have a schema created where I have added Experience event, commerce event and Adobe Analytics experience event field group (as I want to send data to both AA and AEP). Is it okay to use the same schema for both www.xyz.com and blog.xyz.com? 

3. If someone is navigating from www.xyz.com to blog.xyz.com, will Adobe differentiate them as two separate visitors? I am assuming it will not, as the cookie will be set on ".xyz.com" domain.

4. Do I need to create two separate data streams? or having one data stream will suffice?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by dwright-adobe

1. I would strongly recommend trying to stick with one tags property that spans both subdomains, if you can, and develop good naming conventions for your rules so they are easy to manage. And look for ways to consolidate the rules. For example, if two different marketing pixels fire under the same event and condition, use two actions in a single rule to fire them. IMO, things are harder to manage when broken into multiple properties. For example, you would then be managing two Web SDK extensions.

 

2. Yes, it's fine to use the same schema across multiple subdomains.

 

3. The cookies used by Adobe applications are set on the top level domain ".xyz.com" so you should be  fine to identify visitors across the subdomains.

 

4. Yes, you should be able to use the same datastream from two different tags/launch properties

1 reply

dwright-adobeAdobe EmployeeAccepted solution
Adobe Employee
April 3, 2024

1. I would strongly recommend trying to stick with one tags property that spans both subdomains, if you can, and develop good naming conventions for your rules so they are easy to manage. And look for ways to consolidate the rules. For example, if two different marketing pixels fire under the same event and condition, use two actions in a single rule to fire them. IMO, things are harder to manage when broken into multiple properties. For example, you would then be managing two Web SDK extensions.

 

2. Yes, it's fine to use the same schema across multiple subdomains.

 

3. The cookies used by Adobe applications are set on the top level domain ".xyz.com" so you should be  fine to identify visitors across the subdomains.

 

4. Yes, you should be able to use the same datastream from two different tags/launch properties

Level 2
April 3, 2024

@dwright-adobe , Thank you so much! This is super helpful.