This topic has 6 replies, 4 voices, and was last updated 7 years, 2 months ago ago by Amzy Leel
Hello,
I want to track te trafic of my site , i only remembered about doing it after my website as gone live, so i would like to to add the google analytics code to the head in my wordpress pages.
Could you please let me know wich plugin do you reccomend for this and that is fully compatible with your theme? (there are several and i dont want to install one that will broke the website)
Thanks
go to appearance –>> editor and select functions.php and add following code there and save:
add_action('wp_head', 'add_google_analytics');
function add_google_analytics() { ?>
// Paste your Google Analytics code here
<?php } ?>
or
You can use additional plugin “Insert Headers and Footers” if you want to add js in header or footer, including Google analytics code
I used the plugin you recommended , it worked perfectly.
Thanks!
You are welcome!
Regards
Hi! I was trying what you described in the answer above but it didnt work for me. Could you help me to implement Google Analytics on my website?
Thanks
It is because you are using your google analytics code in both ‘Simple Google Analytics’ and ‘Insert Headers and Footers’
deactivate one of them and use your correct google analytics code
You must be logged in to reply to this topic.Log in/Sign up