Reading Time: 3 minutes

Besides its powerful reporting capabilities, one of Google Analytics’s greatest strengths is its ability to be used out of the box for most analytical scenarios. However, successful implementation in certain situations requires modifying the default tracking code first. One such case is Cross-Domain Tracking For Colleges.

Cross-domain traffic is the accumulated traffic your college website receives across multiple domains. “When your college website tracking uses numerous domains, you must set up your analytics to reflect that.” This includes subdomains (e.g., admission.yourcollege.com, blog.yourcollege.com, etc.) and even payment gateways that send visitors away from the website.

Let’s consider the following example:

  • Your college website has an online application form
  • The main college website and the application form are located on two different domains, say www.yourcollege.com and www.yourcollegeadmission.com
  • You want to analyze the relationship between the main college website’s performance and the application form performance, so you implement Google Analytics with the same account ID on both sites.

cross-domain-tracking-google-analytics

Suppose you don’t implement cross-domain tracking in the above example. In that case, Google Analytics will consider the main college and application form websites separate because the tracking cookie (first party) identifying a visitor is not shared between the sites. You couldn’t tell which traffic source is bringing the application form sign-ups because they would all be considered referral traffic.

Tracking Across Domains:

To enable cross-domain tracking, you must share first-party cookie information across domains. Google offers the following methods to enable cross-domain tracking:

_setDomainName(): Share cookie information among multiple domains, multiple domains with subdomains, primary domains with their subdomains, and primary domains with their top-level domains.

_setAllowLinker(): Share cookie information among multiple domains, multiple domains with sub-domains, and primary domains with its top-level domains.

_link(): Share cookie information among multiple domains and domains with multiple subdomains. The _link() method sends cookie information via URL parameters.

_linkBypost(): Share cookie information among multiple domains and multiple domains with multiple subdomains. This method sends information via form action.

Cross-domain Tracking code on the main college website:

Replace UA-XXXX-Y with your account ID and yourcollege.com with your main college website address. Insert this code in the head section of all the main website pages.

Cross-domain Tracking code on application form website:

After setting up the tracking code, you must set up cross-links to pass cookie information.

Setting up the cross-link:

If your web traffic always originates on your main college website and then navigates to an application form domain, you must set up cross-links between them.

For example, If your main college site has a Call-to-Action, say “Online Application,” which sends visitors to an application form page, i.e.

Online Application

Change the hyperlink to:

Online Application

If you pass information between domains using forms, use the  _linkBypost() method instead.

Debugging tracking code:

If you set up a cross-domain tracking code on your college website but aren’t sure whether it’s correctly applied, use the following debugger/extensions to troubleshoot your analytics setup:

Tag Assistant (By Google): This is a Google Chrome extension that troubleshoots the installation of various Google tags, including Google Analytics, Tag Manager, etc.

Web Analytics Solution Profiler (WASP) is a specialized tool for quality assurance and understanding the functionality of analytics tags.

Google Analytics Debugger: This Chrome extension loads the debug version of the analytics JavaScript, and displays code execution information, including error messages and warnings, if your tracking code is set up incorrectly.

Cross-domain tracking will maintain the desired referral and more detailed session information for visitors if properly set up. The more granularly you can track visitor information, the better you can learn about their motivations and behaviours to identify opportunities that convert them into leads.