Multiple Google Analytics codes for individual pages

Sure, that’s possible. Are you including the GA-code anywhere on your site today? If not, you can add the following code to your theme’s functions.php-file: add_action(‘wp_head’, ‘add_google_analytics’); function add_google_analytics(){ global $post; if (is_page(‘page1’)){ ?> <!– Analytics code #1 –> <?php } else if (is_page(‘page2’)) { ?> <!– Analytics code #2 –> <?php } else { … Read more

Installing google analytics code on wordpress blog

Since your question is about installing the google analytics code in WordPress, I will highly recommend you to install the UA-XXXXXX-X tracking code before the closing head tag “</head>“. Just edit the theme header.php file. You don’t need to create a child theme unless you are using someone else’s theme that could potentialy be updated … Read more

Does wordpress insert automatic google analytic?

The reason is you are using HostGator and enable the feature is Google Analytics Integration, by enable this one, HostGator will automatically add this snipped of code into your main website and all of it sub or add-on domain: <script src=”https://wordpress.stackexchange.com/google_analytics_auto.js”></script></head> I my self also faced with this issue, my main website is http://nguyenhuutrong.com and … Read more