Google Tag Manager Practical Guide:Cross-Domain Tracking | BCS Google Tag Manager Practical Guide:Cross-Domain Tracking | BCSBCS

Google Tag Manager Practical Guide:Cross-Domain Tracking

Google Tag Manager BCS 4 years ago (2019-11-18) 2073 Views 0 Comments

In this section,  I will talk about how to do cross-site tracking in Google Analytics and send data from two websites to the same property.

Google Tag Manager Practical Guide:Cross-Domain Tracking

Principle: Each site corresponds to a GTM container. Each site performs the same configuration in GTM, and sends data of different sites to the same GA-Property. The allowLinker and cookieDomain in the tag are to solve the identification problem of the same user at different sites. The problem of uniqueness of cross-site users is solved by passing the user’s uniquely labeled Client ID to another site during cross-site.

Setup Process:

Here I have two websites that need to do cross-site tracking, http://www.bbccss.com and http://www.ichdata.com. We first create a new Property for cross-site tracking to collect data, the tracking ID is UA-69988360-24, now let’s go to GTM to do the configuration:

1、Create two constants

Create first constant to store the Tracking ID:

Google Tag Manager Practical Guide:Cross-Domain Tracking

Create second constant to store the domain name of the site, which is a virtual top-level domain, separated by commas:

Google Tag Manager Practical Guide:Cross-Domain Tracking

2、Set Google Analytics Settings

Create a Google Analytics Settings and do some configuration. This Google Analytics Settings is the basic setting for many tracking, such as page views and event tracking. The specific configuration is as follows:

Google Tag Manager Practical Guide:Cross-Domain Tracking

allowLinker is to ensure the delivery of the Client ID, when the jump to another website will have an ID on the URL.

Auto Link Domains, this is a virtual primary domain that is shared by two websites.

Tracker Name is to ensure that data is sent to different properties. If your site sends data to multiple properties, be sure to set the Tracker Name.

3、Set Tags

In the final step, set the tag, this step is the same as configuring the base tracking code.:

Google Tag Manager Practical Guide:Cross-Domain Tracking

On another website, do the same configuration as above.

4、Preview and Publish

Finally, let’s test it, click Preview in the upper right corner, and open http://www.bbccss.com:

Google Tag Manager Practical Guide:Cross-Domain Tracking

Click on the link to jump to another website and notice the changes on the URL:

Google Tag Manager Practical Guide:Cross-Domain Tracking

The Client ID is passed in and the two sites recognize the same visitor.

If there is no client ID on the URL of another site after clicking, then it is not recognized that he is the same visitor, that is, cross-site tracking is not successful. As long as the client ID is on the URL, the cross-site tracking is successful.

 


If you don't understand, You can leave a comment below.
Like (1)
Post my comment
Cancel comment
Expression Bold Strikethrough Center Italic

Hi, you need to fill in your nickname and email!

  • Nickname (required)
  • Email (required)
  • Website