Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Try deactivating all of your plugins to explore whether any could be responsible. If none are, keep all plugins deactivated and switch to the Twenty Fifteen/ Fourteen theme to see whether it could an issue with your theme.
Go to Appearance > Editor then open Theme Header Underneath </head> at star of <body> you should see PHP code like this only it will have php tags rather than “NOTPHP tags
Where it says YOUR GOOGLE ANALYTICS PROPERTY it will have that reference. You may have this code twice. You want to keep your own and delete the on belonging to the site developers.
Save a copy of the file before you edit it.
<?NOTPHP
add_action(‘wp_footer’, ‘axxxxdd_googleanalytics’);
function add_googlexxxxxxanalytics() { ?>
<scrxxxxxxipt>
(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’,’//xxx.googlexxxxxanalyticsxxxxcom/analytics.js’,’ga’);
ga(‘create’, ‘<
YOUR GOOGLE ANALYTICS PROPERTY REFERENCE
‘, ‘auto’);
ga(‘send’, ‘pageview’);
</scrxxxxipt><NOTPHP } >
Thank you guys, but I still not finding it. I went where @bill7473 told, but there’s nothing like this in the code. 🙁
And, I didn’t find the right place you told. I go only to the header.php options, that are in the right collun in Appearance > Editor.
Is there a place where I can see and edit all the site code?
Thank you
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
*Reads about editing the theme file*
OH GOSH. NO.
If you want to use Google Analytics, do not edit your theme’s files. That’s a horrifically bad idea as you’ll lose all your work when the theme updates.
Can you share a link to your site? That may help us help you find where to look.
@jdembowski it’s estiling.com
Thank you!