Is Your Website's Cross-Domain Tracking Working? Here's How to Check

Cross-domain tracking is an all-too-often overlooked area of web analytics. It’s the kind of thing that we take for granted when it’s working, but can really cause problems when it’s not. In this post, we are going to review three methods of verifying that cross-domain tracking is working properly in your analytics setup.

Warning signs

Cross-domain tracking is a wonderful feature that allows you to attribute conversions and behavior to your campaigns even if the user journey spans multiple domains. Without it, attribution would be nearly impossible for those of us who have more than one domain (such as sites with a separate shopping or checkout domain). Here are some signs you can look for in your reports that can indicate that cross-domain tracking isn’t working quite right.

  • There is more direct traffic than you would expect
  • Your conversions are nearly all attributed to direct traffic
  • Traffic on one domain has various campaigns being attributed, while another domain includes only direct traffic

Basically, if direct traffic is accounting for more traffic or conversions than you’d expect, this could mean analytics is losing track of the attribution when your users switch domains. This tells us that cross-domain tracking could be malfunctioning.

Testing your cross-domain tracking

There are a few methods you can use to check to see if your tracking is following users across domains:

Check for the ‘_ga’ query string parameter when clicking to other domains.

This is a very quick check but can be very effective. Essentially, cross-domain tracking for Google Analytics depends on Domain A sending the user tracking profile to Domain B so that GA can stitch their sessions together in the reports. Since this cannot be done by setting a cookie (we cannot set cookies for domains we are not on), Google sends the client ID via the URL. Once the user arrives on Domain B, the tracking code sees the client ID in the URL and knows that this is a continuation of the session that began on Domain A.

So how do we check to see this is happening? Simply go to your site and click whichever link takes you to your other domain. Once you arrive, check the URL. Does it contain the ‘_ga’ query? If so, then you are probably good to go. If not, you will need to work with your developers to get that query string added to your outbound links.

Cross-domain tracking query

Notes

  • Sometimes it is not as simple as adding a parameter to a link. There are more complex methods of directing users to a URL, so work with your dev team to ensure that the user is sent with the client ID in all cases.
  • In rare cases, adding a query string parameter to a URL can cause a site to not function properly. Again, work with your dev team to make sure this is not an issue.

Check the ‘_ga’ cookie

This method is a little more technical but is a more reliable way of checking cross-domain tracking. What you will need to do is check the value of the ‘_ga’ cookie in your browser when you are on domain A, and then again when you click over to domain B. If cross-domain is installed correctly, then the value of the cookie will be identical on both domains.

This method can be useful if your domains use rapid redirects when a user arrives that may strip URLs of their query string parameters. Ultimately, it is more important that the cookies match than that the URL has the ‘_ga’ query. The query is only there so that the cookie can be populated correctly.

Follow yourself through your reports

This is the most involved method, but is certainly the most accurate. Essentially, you give yourself a unique set of UTM parameters that will set you apart from all other traffic in your reports. Then, when you take the user journey from Domain A to Domain B, you’ll be able to see in the reports if your source/medium value drops off. This is an indication that GA is not connecting the sessions on the two domains. A typical test may look like this:

  1. Decide on your UTM parameters. It does not matter what they are, as long as they are unique to you. I usually go with something like ?utm_campaign=james_test&utm_source=james_test&utm_medium=james_test
  2. Navigate to Domain A with your UTM parameters. This will look something like https://www.example.com? utm_campaign=james_test&utm_source=james_test&utm_medium=james_test
  3. Open your GA real-time traffic sources report and look for your source and/or medium. Once you see it, click on it to tell the report to filter out everything but that source/medium.

    Google Analytics Traffic Sources
  4. Navigate to the realtime content report. This will show you what page you are currently on.

    Google Analytics Realtime Content Report
  5. Return to the tab where you are on Domain A. Take the normal user journey that sends users to Domain B. Once you are there, go back to your real-time report in GA.

    Google Analytics Filtered Realtime Report

The URL should update to reflect that you are now on the new page on Domain B. If the URL does not update and continues to show the page on Domain A, or if it disappears altogether, your cross-domain tracking is broken. It’s not that GA isn’t tracking you on Domain B (probably), it’s just that GA doesn’t recognize your Domain B session as a continuation of your Domain A session, so it treats it as direct traffic rather than traffic coming from your fake campaign (‘james_test’ in my case).

Next Steps

Once you’ve confirmed that cross-domain tracking isn’t working properly, the next step is… fix it! There are a number of ways to implement this tracking, and the one we use will be dependent on the specific conditions of our analytics setup. Check out our cross-domain implementation guide to get started!

Let’s talk.

Name