In case you use the new version of Google Analytics — the 4th one, you should set up the numbers insertion script without attaching it to your Google Analytics script.

Firstly, check if Google Analytics 4 is set up on your website in its code.

1. Check if you set up the Universal Analytics script

  1. Go to your web page. Click the mouse's right button and select "View page source".

  2. Once you open the web page code, click Ctrl+F and enter https://www.googletagmanager.com/gtag/js?

    If your Google source ID looks like this G-XXXXXXXX, then it's Google Analytics 4.

    The script of it also looks like this:

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXX"></script>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'G-XXXXXXXX');
    </script>

2. Insertion script

  1. The script is easy to install. Cope the template of the adapted script for Google Analytics 4:

    <script type="text/javascript">
    (function (d,s,u,e,p) {
    p=d.getElementsByTagName(s)[0],e=d.createElement(s),e.async=1,e.src=u,p.parentNode.insertBefore(e, p);
    })(document, 'script', 'https://script.ringostat.com/v4/ХХ/ХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХ.js');

    var pw = function() {if (typeof(ringostatAnalytics) === "undefined") {setTimeout(pw,100);} else {ringostatAnalytics.sendHit('pageview');}}
    pw();
    </script>

    then past is in your website code.

  2. Change the field https://script.ringostat.com/v4/ХХ/ХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХ.js to the real link of your project script.

    You can find the link in "Call tracking" => "Script settings".

    The adapted script will look like this:

  3. After you embed the adapted script in your website code, go to "Call tracking" => "Script settings" in your project menu. And in the "User settings" field add the required setting "noGa": true,

    And don't forget to apply the settings. ;)

Did this answer your question?