Some pageviews are not tracked

Hi there,

a few times a day I’m getting those entries in my recent visitors log:


It even shows the time they spend on the amazon page sometimes. This also happens when it’s their first visit on my website.

However, that’s impossible, because they basically opened an amazon link before opening my website - according to matomo.

What could the problem be?

Here’s another picture. That’s really bad, I can’t see from which site they’re clicking the affiliate links. Here, it’s even 4 people where no pages got tracked at all!!

Can anyone help me?

I’m using borlabs cookie to add the matomo code on my website.
Before they accept the cookies, matomo should be running without cookies (so fingerprinting).

That’s the code which I have set in borlabs cookie:
Fallback Code (code which is always executed):

<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['requireCookieConsent']);
_paq.push(['enableHeartBeatTimer', 2]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);


(function() {
var u="%%matomoUrl%%";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '%%matomoSiteId%%']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->

Opt-in Code:

<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
_paq.push(['rememberCookieConsentGiven']);
</script>
	
<!-- End Matomo Code -->

Opt-out Code:

<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
_paq.push(['forgetCookieConsentGiven']);
</script>
	
<!-- End Matomo Code -->

Is that correct?

Hi,

The tracking code looks fine, but I can’t know if borlabs cookie does the correct thing with it.

I don’t really have much clues about why this happens, but would it be possible for you to send me a direct message with the URL to the tracked website. Maybe I notice somthing weird.

1 Like

I’ve sent you a private message.
Also changed the tracking code a bit:

<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['requireCookieConsent']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['enableHeartBeatTimer', 5]);


(function() {
var u="%%matomoUrl%%";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '%%matomoSiteId%%']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//analytics.gravili.de/matomo.php?idsite=1&amp;rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->

idk if that changes anything, but worth a try

Issue is still open, btw. Would be great if anyone has a solution for that or experiences a similar problem.

Bump. Still getting this issue