Comments on: Google Analytics to WordPress https://createawebsitenow.com Free resource for helping beginners to build, manage and grow their websites. Mon, 14 Feb 2024 12:07:54 +0000 hourly 1 https://wordpress.org/?v=6.0.1 By: Nick Sch"aferhoff https://createawebsitenow.com/google-analytics-wordpress/#comment-355225 Mon, 05 Apr 2021 13:54:07 +0000 https://createawebsitenow.com/?p=8384#comment-355225 In reply to Tim.

Hey Tim, the plugin likely injects the tracking code into the header section on the page via a function. It does not write it into the header file, otherwise it would get lost when you switch themes or someone could accidentally delete it. If you want to find it on you site, open your homepage, then open the browser developer tools and search for “google” in the HTML inspector. You should then find the script belonging to Google Analytics.

]]>
By: Tim https://createawebsitenow.com/google-analytics-wordpress/#comment-348231 Mon, 22 Mar 2021 05:48:53 +0000 https://createawebsitenow.com/?p=8384#comment-348231 I just connected Google Site Kit to my WP site including Analytics. Just for fun I went to theme editor > header (and functions) php to try to see the GA tracking code, but couldn’t find it. Does Google Site Kit not add the usual GA tracking code to the header? Which pages are the codedautomatically added in and how do I find them?

]]>
By: Teo Dumi https://createawebsitenow.com/google-analytics-wordpress/#comment-201404 Wed, 23 Sep 2020 17:33:04 +0000 https://createawebsitenow.com/?p=8384#comment-201404 In reply to Karen.

Awesome, your functions.php method worked! Kudos!

]]>
By: CreateaWebsiteNow Editorial https://createawebsitenow.com/google-analytics-wordpress/#comment-196276 Fri, 14 Aug 2020 16:15:11 +0000 https://createawebsitenow.com/?p=8384#comment-196276 In reply to Ramod.

Don’t worry about the URL or version, they’re just comments in the code to help you keep track of things – they don’t affect the code in any way. 10 is the level of priority for the function, meaning when it should be executed. 10 is the default value, so just leave it as it is.

]]>
By: Ramod https://createawebsitenow.com/google-analytics-wordpress/#comment-196066 Tue, 11 Aug 2020 07:47:23 +0000 https://createawebsitenow.com/?p=8384#comment-196066 -When I make my own plugin, what should I enter to;
1. Plugin URL:
2. Version:
-What is meant by number 10 in the last sentence?
add_action( ‘wp_head’, ‘ns_google_analytics’, 10 );
Please help me.

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/google-analytics-wordpress/#comment-193376 Fri, 03 Jul 2020 12:48:51 +0000 https://createawebsitenow.com/?p=8384#comment-193376 In reply to sahasra.

You should only ever use one method at a time to connect your website to Google Analytics. Adding more than one tracking code will distort your data. That’s probably the reason why your bounce rate is lower when you use both kinds of implementation. So, you should definitely remove one of them.

]]>
By: sahasra https://createawebsitenow.com/google-analytics-wordpress/#comment-191683 Thu, 18 Jun 2020 16:08:38 +0000 https://createawebsitenow.com/?p=8384#comment-191683 What i observed is, if i use analytics with plugin and manual it is showing a low bounce rate. When I use google analytics either manually or custom it is showing a high bounce rate. Which one is correct?

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/google-analytics-wordpress/#comment-190557 Wed, 03 Jun 2020 14:12:22 +0000 https://createawebsitenow.com/?p=8384#comment-190557 In reply to Grateful.

Sounds like you did a great job! Happy to be of service!

]]>
By: Grateful https://createawebsitenow.com/google-analytics-wordpress/#comment-188499 Sat, 09 May 2020 14:30:07 +0000 https://createawebsitenow.com/?p=8384#comment-188499 Thank you. Was struggling with getting the code to work on my blog which is a subdirectory of my main domain…the report was not showing the pages visitted…just a “/”.
So I deleted monsterinsights and Site Kit by Google, and added the script manually using functions.php tactic you mentioned above. And the page URLs now show up.

Keep up the great work.

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/google-analytics-wordpress/#comment-180330 Tue, 03 Mar 2020 14:13:46 +0000 https://createawebsitenow.com/?p=8384#comment-180330 In reply to Hope.

Sounds like you are trying to upload the files as they are. You need to turn them into a zip file to upload them. To upload to wp-content/plugins, you need to log into your server via FTP.

]]>
By: Hope https://createawebsitenow.com/google-analytics-wordpress/#comment-179802 Wed, 26 Feb 2020 22:00:26 +0000 https://createawebsitenow.com/?p=8384#comment-179802 In reply to Nick Sch"aferhoff.

I’m running into this same issue. I’m trying to upload through the wordpress user interface. (…/wp-admin/plugin-install.php)
This upload option is restricted to .zip files.

How do I upload to wp-content/plugins?

]]>
By: Karen https://createawebsitenow.com/google-analytics-wordpress/#comment-178769 Mon, 10 Feb 2020 05:29:03 +0000 https://createawebsitenow.com/?p=8384#comment-178769 In reply to Nadia.

Nadia: Go to Appearance->Theme Editor, and look through the section on the right side that says “Theme Files”. Most themes have a file called header.php, although it’s not a guarantee. [Note: If right under “Theme Files” it says, “This child theme inherits…”, it means you are already using a child theme, so if you don’t see header.php in the list, select the parent theme and look again.]

As Nick said, if you are not already using a child theme, you should do so before editing theme files, so that you won’t lose your customizations. You can even use a plugin to set up the child theme for you (and delete it when you’re done – you don’t have to keep it running) – I know how to make a child theme manually, but I use the “Child Theme Configurator” plugin to save time. Once you have a child theme, copy header.php from the parent to the child and add the Google code.

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/google-analytics-wordpress/#comment-178522 Fri, 07 Feb 2020 10:03:41 +0000 https://createawebsitenow.com/?p=8384#comment-178522 In reply to Nadia.

Hey Nadia, you find the file in your theme directory (wp-content/themes). If you make changes to it, be sure to create a child theme, otherwise you will lose your modifications to your next theme update. Alternatively, you could also use a plugin that allows you to include scripts in your header or footer from the WordPress back end, such as https://wordpress.org/plugins/header-and-footer-scripts/.

]]>
By: Nadia https://createawebsitenow.com/google-analytics-wordpress/#comment-175936 Fri, 03 Jan 2020 20:12:07 +0000 https://createawebsitenow.com/?p=8384#comment-175936 Hi Nick,

Thank you for sharing this valuable content! I really appreciate it!

Only i got lost in the beginning…where do I find the ¨ header.php file¨ ?

Regards,

Nadia

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/google-analytics-wordpress/#comment-175901 Fri, 03 Jan 2020 14:09:26 +0000 https://createawebsitenow.com/?p=8384#comment-175901 In reply to dim mar.

Hey Dimitri, this is a somewhat complex topic and you can find help for it here: https://www.directom.com/google-analytics-subdomain-tracking/

]]>