Google Analytics Plugin Not Working in X Theme

I Installed the Google Analytics plugin for X theme I copied the entire tracking code and updated the plugin but the code does not appear on my website (I searched the source code). I tried uninstalling and reinstalling the plugin, I copied the whole tracking code I also tried just using what was between the tags (including the script tags). Nothing works.

Hello @CMS911,

Thanks for asking. :slight_smile:

Please make sure that you have setup Google Analytics plugin as per following tutorial:

If it does not works, please share website login details (url/username/password) in a secure note.

Another way of adding Google Analytics code is to add following code in child theme function.php file:

function third_party_tracking_code() { ?>

  <script>
   
  // Google Analytics.
  </script>

<?php }

add_action( 'wp_head', 'third_party_tracking_code' );

Replace // Google Analytics. with the tracking code.

As I said that the above method will require you to setup child theme. You can take a look at following resource to download and setting up child theme.

https://theme.co/apex/child-themes

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.