Jump to content

Google Analytics tag


Recommended Posts

Hi,

I received this notice from google analytics

To enable data collection, you need to add your new Google Analytics tag (gtag.js) to the header of every page of your site

 

Where to add this tag ?

Edited by Marafa
Link to comment
Share on other sites

He most likely has old GA tag (UA) and needs to replace it with GA 4 tag.  Google is ending support for UA in July and requiring people to move to new GA4 tag. 

If you did the initial integration of the UA tag the recommended way, it would be in ACP - System - Site Features - Integrations.  Choose Google Analytics and update the code.  If you manually edited your theme, you would have to do that again there. 

Link to comment
Share on other sites

57 minutes ago, Marafa said:

Hi

I did not do anything, as I do not know what needs to be done and how

Sign in to your Google Analytics account.
Register your site for GA4
Get code for GA4
Open your script in ACP for Google Analytics.
Before closing script tag add gtag , or your script will look like this

<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-your old ID');
  gtag('config', 'G-your ga4 ID');
</script>

Save this.
That's all about connecting an IPS site to Google's GA4.
Go through all the directions in your Google Analytics profile and select anything that makes sense to you.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...