Jump to content
thirty bees forum

Recommended Posts

Posted

I'm unable to get the use proxy script feature to work. While researching, I came across these instructions: https://github.com/matomo-org/tracker-proxy?tab=readme-ov-file

It doesn't look like the files mentioned that should be downloaded are installed via the tb native Matomo module:

Quote

Is this because the native module is out of date or is it because of something else?

Posted (edited)

And a follow-up question: Is there any analytical benefit to using the native Matomo module compared to just using the tracking code?

Also, sometimes when I visit the settings page I get this error and then suddenly it's gone again, without any changes being made:

Quote

Unable to connect to the API {"result":"error","message":"Unable to authenticate with the provided token. It is either invalid, expired or is required to be sent as a POST parameter."}

 

Edited by 30knees
  • 2 weeks later...
Posted
On 2/27/2024 at 7:23 PM, 30knees said:

I'm unable to get the use proxy script feature to work. While researching, I came across these instructions: https://github.com/matomo-org/tracker-proxy?tab=readme-ov-file

It doesn't look like the files mentioned that should be downloaded are installed via the tb native Matomo module:

Is this because the native module is out of date or is it because of something else?

As this is a tb native module, would you be able to help here, @datakick?

  • 1 month later...
Posted (edited)

Important msg for Matomo users

While browsing Google Search Console today, I discovered that GoogleBot was only loading small section of my product pages.

Error from GSC: "Page resources. Failed to load 1/57 of resources"

GoogleBot was blocking by matomo.js file.

The solution is simple, add following line to script:

_paq.push(['disableAlwaysUseSendBeacon']);

Example of full code with added line:

<script>
        var _paq = window._paq = window._paq || [];
        /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        _paq.push(['disableAlwaysUseSendBeacon']);
        (function() {
          var u="https://store-domain.com/";
          _paq.push(['setTrackerUrl', u+'matomo.php']);
          _paq.push(['setSiteId', '2']);
          var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
          g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
        })();
</script>

If you are using Matomo Web Analytics module add code to file: /modules/piwikanalyticsjs/views/templates/hook/jstracking.tpl (line 27)

I discovered this when I saw that the number of reviews visible in a Google search had started to fall rapidly.

reviews.jpg

Edited by Adik
  • Thanks 1
Posted
On 4/15/2024 at 7:11 PM, Adik said:

If you are using Matomo Web Analytics module add code to file: /modules/piwikanalyticsjs/views/templates/hook/jstracking.tpl (line 27)

Do you mean that

(...)
{if $PIWIK_USE_PROXY}
      _paq.push(['setTrackerUrl', u]);
    {else}

becomes 

_paq.push(['disableAlwaysUseSendBeacon']);
{if $PIWIK_USE_PROXY}
      _paq.push(['setTrackerUrl', u]);
    {else}

Posted (edited)

I added code after enableLinkTracking :

 {if isset($PIWIK_RCOOKIE_TIMEOUT)}
      _paq.push(['setReferralCookieTimeout', '{$PIWIK_RCOOKIE_TIMEOUT|escape:'javascript'}']);
 {/if}
      _paq.push(['enableLinkTracking']);
      _paq.push(['disableAlwaysUseSendBeacon']);

 

Edited by Adik
  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...