I think I need to update this code:
var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-36713432-1’]);
_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>
To something like:
ga.src = <?php
if ( $this->options[‘gajslocalhosting’] && !empty( $this->options[‘gajsurl’] ) ) {
echo “‘” . $this->options[‘gajsurl’] . “‘;”;
} else {
$script = ‘dc.js’;
if ( current_user_can( ‘manage_options’ ) && $this->options[‘debug’] )
$script = ‘u/ga_debug.js’;
echo “(‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘stats.g.doubleclick.net/” . $script . “‘”;
}
?>;
2 things; 1) not sure where to find code on site to start with and 2) not sure what changes to make to code (i suspect it’s not simply replacing)
If you use the same Google Analytics plug-in as I do, you need to change the code within the plugin, not in your .php files.
Click on ‘Plug-ins’ in your dashboard, find the Google Analytics plug-in, and click the ‘Edit’ button. This will take you to the code page you need to edit.
The Analytics code I had to replace was much simpler than what you posted, and Google Analytics made it very easy to see which line of code needed replacing. I would double-check the Analytics site before making the change f I were you.