Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

at.js 2.0.0 Cross domain tracking is not supported- alternate option

snehaa30982388
Level 3
Level 3

Hi ,

We have recently upgraded from at.js 1.6 to at.js 2.0.0 to support VEC for single page applications. However as per documentation below , at.js 2.0.0 no more supports cross domain tracking.  Can anyone please suggest any alternate solution for cross domain tracking with at.js 2.0.0 ( ability to create a Target activity that spans siteA.com and siteB.com and the visitor would remain in the same experience when they crossed domains)

https://docs.adobe.com/content/help/en/target/using/implement-target/client-side/atjs-cookies.html

Third-party cookies and cross domain tracking is not supported

Cross-domain tracking makes it possible to see sessions on two related sites, but with different domains, as a single session. You could create a Target activity that spans siteA.com and siteB.com and the visitor would remain in the same experience when they crossed domains. This functionality ties into at.js 1.x third-party and first-party cookie behavior.

In at.js 1.x, the third-party cookie was stored in the [CLIENTCODE].tt.omtrdc.net domain and the first-party cookie was stored in clientdomain.com. The first request returned HTTP response headers that attempted to set third-party cookies named mboxSession and mboxPC, whereas a redirect request is sent back with an extra parameter (mboxXDomainCheck=true). If the browser accepted third-party cookies, the redirect request includes those cookies, and the offer was returned. This workflow was possible because at.js 1.x used the HTTP GET method.

However, in at.js 2.x, HTTP GET is no longer used and instead uses HTTP POST. HTTP POST is now used via at.js in order to send JSON payloads to Target edge servers instead of key-value parameters. This means that the redirect request to check whether a browser supports third-party cookies now breaks. This is because HTTP GET requests are idempotent transactions while HTTP POST is non-idempotent and mustn’t be arbitrarily repeated.

Therefore, neither third-party cookies nor cross-domain tracking are supported in at.js 2.0.0.

Thanks!

3 Replies
Docea
Employee
Employee

snehaa30982388​,

It's so hard writing this reply. I feel your pain you are stuck between a hard place and a rock. Engineering and Product Management are looking into how to make this possible however as of right now  you woudl have to downgrade to an earlier version of at.js see: at.js version details

Although not the answer you woudl have liked to get if this helps you move forward please don't forget to like, mark as helpful. Hope you have a wonderful day.


Mihnea Docea | Technical Support Consultant | Customer Experience | Adobe | (:: 1 (800) 497-0335

lucass24692458
Level 1
Level 1

Hey Team, 

 

This problem still happens or Adobe already fix this problem @Docea ?

 

I have the AT.js v2.2.0 and some cases works fine in cross-domain (ex:siteA.com going to siteB.com), but just for metrics, when im try to make an experience cross-domain, i cant be qualified for this experience(trying with MboxTrace), i guess the problem is because the cross-domain still doesnt work fine in this case. But doesnt make sence the metrics count...

 

 

Thanks

 

khushbook25
Employee
Employee

To identify user across cross-domains in at.js 2.x, probably, you can try the below approach.

You can try passing the ECID as a query parameter in the URL. Let's consider the scenario as A as your site1.com and B as your site2.com

  1. First, fetch the ECID on A
  2. Then, update the navigation link/href (which redirects to B) on A by including the ECID mentioned in point1.
  3. At last, get the ECID from URL on B and overwrite the one available on this page.

 

Thanks!