Google Analytics is a popular tool used to track activity on your website. Because we don't want your IDX Broker pages missing out on the action, you can ensure that these pages are counted, too.
Using your Global Wrapper, you can add Google Analytics Tracking code to your IDX pages. The current, Universal Analytics tracking code recommended by Google should go into the head section of both your own pages and your global wrapper, just before the closing head tag.
An example of this code is shown here.
< script>
// < ![CDATA[ (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-XXXX', 'auto');
ga('require', 'linkid', 'linkid.js');
ga('require', 'displayfeatures');
ga('send', 'pageview'); // ]]>
< /script>
Once you correctly install the Google Analytics Tracking Code on your site, and within the HTML wrapper on your IDX account, you should begin receiving report data. Google says that report data shows up in your reports within 24 hours of setting up the tracking code.
Google provides more information about Tracking Code. You may need to modify your tracking code to track both your own pages and your IDX pages according to Google's instructions for cross domain tracking or subdomains.
You can also check out our article about conversion tracking.
NOTE: If you encounter issues with your tracking code, please ensure that you are using the Universal Analytics, and not the legacy Google code.