Home Forums Themes Support HelpDesk How to add google analytics code

Viewing 1 reply thread
  • Author
    Posts
    • #22845

      Hi

      you have mentioned that i have to add google analytics code without script tag, here is an example and tell me please what to remove:

      <!– Global site tag (gtag.js) – Google Analytics –>
      <script async src=”https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-1″></script&gt;
      <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag(‘js’, new Date());

      gtag(‘config’, ‘UA-xxxxxxxxx-1’);
      </script>

    • #22869

      Hi,

      For GoogleTagManager we don’t have option to do it.

      Please use plugin https://wordpress.org/plugins/insert-headers-and-footers/ to insert your script code.

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

Viewing 1 reply thread

You must be logged in to reply to this topic.