Using this configuration, you will be able to integrate Google Analytics on Advanced Billing’s Public Signup Pages and/or Advanced Billing’s receipt pages.
Please be aware that this article is related to Advanced Billing's integration with Google Analytics. You can learn more about this integration by checking out this help article: Google Analytics Overview.
Obtain your Google Analytics Tracking ID
- In Google Analytics, click Admin on the top menu.
- Under the PROPERTY column, click Tracking Info and then click Tracking Code.
Your Tracking ID will appear as UA-XXXXXXX-Y. Below is an example Tracking ID, yours will be different.
Example Tracking ID
Edit the tracking code and place it in Advanced Billing
In the Google Analytics tracking code below, replace the text “UA-XXXXXXX-Y” with your Tracking ID. Then, copy the code and paste it in your Advanced Billing custom JavaScript section of your Public Signup Pages. Put the code at the very bottom of your JavaScript – this ensures that if anything is wrong, you do not disable any other JavaScript you may have. If you already have similar Google Analytics code be sure to remove it. When you’re done, save your changes.
if ($('.public-signup-page').length !== 0) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXX-Y', 'auto');
ga('send', 'pageview');
}
Test in real-time
- In Google Analytics, click “Reporting”
- Click “Real-Time” and then click “Overview”
- Open one of your Advanced Billing Public Signup Pages that has your Google Analytics code
- In your Google Analytics account, you will see an active user appear (this may take up to a minute)
If you see an active user: You have successfully configured a basic Google Analytics integration with Advanced Billing.
If you do NOT see an active user: something is incorrect with your configuration. Repeat this section and try again. Common errors include using an incorrect tracking ID, having script
tags in your code, or copy/pasting the tracking code directly from inside your Google Analytics account instead of using the modified tracking code listed in step 2 above, “Edit the tracking code and place it in Advanced Billing.”