Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Google Analytics Code to Support Display Advertising

Home / Forums / Virtue Theme / Google Analytics Code to Support Display Advertising

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
  • This topic has 2 replies, 2 voices, and was last updated 12 years ago by Nic.
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 (

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&#8217; : ‘http://www&#8217;) + ‘.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://&#8217; : ‘http://&#8217;) + ‘stats.g.doubleclick.net/dc.js’;

var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

  • The forum ‘Virtue Theme’ is closed to new topics and replies.