Does the Google Analytics Connector tag go before or after the standard GA tracking code (GATC)?

  • Updated

The short answer is that is doesn't matter where you place the script as long as you selected the "Asynchronous" option when generating the script. Generally we recommend it be placed at the end of the body, but it can also go in the head. We designed it to be able to run before or after the regular GA integration script. They run completely independent of one another, so any waiting or errors (rare) in the Demandbase integration won't affect the GA script.

We generally recommend placing it after the GA integration script so that the _trackPageView happens first. In this case we know that ga.js has already loaded and will listen for additional events (or changes to the _gaq variable).

That said, there are no negative consequences if the _trackEvent call (that sends the custom variables) happens before the _trackPageView because the custom event will then happen at with the _trackPageView call. The only potential for the Demandbase integration to fail is if the standard GA script fails and ga.js never loads. I've never seen this happen, but it's possible if the file hosted by Google isn't available.

Was this article helpful?

0 out of 0 found this helpful