简体   繁体   中英

Cross-domain tracking Google Analytics and GTM

I am setting up a website and there's two separate domains. the domains are:

www.exampledomain.se www.exampledomain.com

I have two separate Google Tag manager containers and two separate Google Analytics accounts. One is connected to each. However the, thank you page after a monetary transaction has been completed is universal and is the same for both pages except the currency that is listed in the url. How can I link this "thank you page" to each domain and only flow the correct data in terms of the currency? Is this possible without any code?

Instead of tracking the "thankyou" page to a third property you (if I understood correctly) want to click transactions that were initiated by www.exampledomain.se in the GA property for www.exampledomain.se, and similar for the .com domain.

Assuming the confirmation is a single page on a different I would suggest the following:

  1. active the built-in referrer variable

  2. create a lookup table variable with the referrer as input variable

  3. add two rows to the loolup table; if the referrer is the se domain return the tracking id for se, and for com respectively

Your lookup table will look something like this:

在此处输入图片说明

  1. Use that lookup table variable in your GA tag instead of a fixed UAID
  2. Enter both your domains in the "link domains" field (or create another lookup table to set only the relevant domain, shouldn't really matter)
  3. Configure the GA tags in your .se and .com domain for cross domain tracking with the domain for your "thankyou" page

Setting the UAID based on referrer will only work if this is indeed a single page (since on a second page the referrer would no longer point to the external domain).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM