March 21, 2014 at 6:26 pm
The Google Analytics field in the theme options—>advance settings is super helpful! I was trying to add demographic data to my google analytics reports, but when I use GA to validate if this type of tracking has been enabled, GA notifies me that “Demographic Interest Reports…Tracking code changes needed.” Per GA, I need to update a line of code, although I’m not sure where I can find that code.
I looked through the footer and header.php files but I couldn’t find this code anywhere. I also searched the theme folder for an ‘analytics.js’ file, but came up empty handed. Do you have any recommendations on how I could update this code on the Virtue theme?
Here is the single line of code update that GA recommends (*Login to see link
To implement Remarketing, Demographics and Interests reporting, or GDN Impression Reporting, replace the bold text in this example:
<script type=”text/javascript”>
var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-xxxxx-y’]);
_gaq.push([‘_trackPageview’]);
(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
with the bold text in the example below:
<script type=”text/javascript”>
var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-xxxxx-y’]);
_gaq.push([‘_trackPageview’]);
(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://’ : ‘http://’) + ‘stats.g.doubleclick.net/dc.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();
</script>