So you’ve read about RunSignUp and Google Analytics and you realize how helpful it can be to track the web traffic related to your event. You’ve added your Google Analytics information to your RunSignUp race but you’ve got your own race website and are either linking to RunSignUp for registration, or are using the RunSignUp widgets on your website and you’re concerned about cross-domain tracking. Don’t worry; RunSignUp has worked out the process for all of the common implementations of Google Analytics and RunSignUp registration. The only thing you’ll need to know to get started, is which version of Google Analytics your website is currently running.
Asynchronous or Universal Google Analytics?
Once you know what type of Google Analytics you are running on your website, you’ll need to update the site-wide code to support cross-domain tracking. The exact update you’ll need to make will depend on if you are running the Asynchronous or Universal version of Google Analytics.
Updating Universal Google Analytics
If you are using the Universal Version of Google Analytics, you will want to make the updates shown below in red being sure to replace ‘example-2.com’ with ‘runsignup.com’. This will tell your Google Analytics setup that when linking to RunSignUp, it should automatically include the additional information needed to support cross-domain tracking. If your Google Analytics is already configured for cross-domain tracking, simply add RunSignUp to the list of supported domains.
To view the full reference on updating Universal Analytics to support cross-domain tracking see the Google Support Guide located here.
Updating Asynchronous Google Analytics
If you are using the Asynchronous version of Google Analytics and have chosen not to upgrade to the universal version, you will want to make the updates shown below in red.
If you are using an unmodified version of the Asynchronous Google Analytics, then you will be adding two lines of code to this snippet, the setDomainName, and the setAllowLinker. Be sure to set the domain name listed to be your website’s domain. If you’ve already setup your Google Analytics to support cross-domain tracking for another website, you will not need to make any changes to your site-wide script.
To view the full guide on updating a website to support cross-domain tracking, you can view the Google support document located here.
Updating Links to RunSignUp
If you are using the Universal version of Google Analytics, you’re already done! When using the Universal version of Google Analytics, the code automatically detects all links to the supported domain and adds the Google Analytics information to all links. If you are using the Asynchronous version of Google Analytics, you must tag all links to RunSignUp to add the information needed to support cross-domain tracking. In order to do this, you must add the information shown below in red to any links pointing to RunSignUp…
Be sure to replace the example url listed above with the page you are linking to on RunSignUp. This update will let your website know that whenever someone clicks on the link, that Google Analytics should get the extra information needed for cross-domain tracking and include it on the link to RunSignUp.
Updating RunSignUp Widgets… Next Week!
Using RunSignUp’s widgets on your website? Stay tuned for the next installment on RunSignUp and Google Analytics coming next week. It will walk you through the process of how to support cross-domain tracking when including widgets directly on your website. It will include the code necessary to support the tracking, and a line-by-line breakdown of the update.