Hi community,
we are struggling with a strange issue: We use content tracking on multiple pages. For administrative reasons we have multiple trackers (one for ads, one for articles and so on + one for the page itself).
Now we noticed, the the redirect url which is created by matomo is wrong/cropped on some mobile devices (mostly android < 7 in combination with the chrome mobile browser).
link in html:
https://contentdomain.de/artikel/85870220
replaced by matomo in desktop browsers (works fine!):
https://{our-matomo-server}.de/matomo.php?redirecturl=https%3A%2F%2Fcontentdomain.de%2Fartikel%2F85870220&c_i=click&c_n=NW&c_p=NW85870220&c_t=https%3A%2F%2Fcontentdomain.de%2Fartikel%2F85870220&idsite=321&rec=1&r=704562&h=9&m=21&s=37&url=https%3A%2F%2Fcontentdomain.de%2F&_id=2ac2cc30b61c35c0&_idts=1595263707&_idvc=4&_idn=0&_refts=0&_viewts=1599632497&send_image=0&pdf=1&qt=0&realp=0&wma=0&dir=0&fla=0&java=0&gears=0&ag=0&cookie=1&res=2560x1080>_ms=155&pv_id=BkKUa6
In mobile:
https://{our-matomo-server}.de/matomo.php?redirecturl=https%3A%2F%2Fcontentdomain.de%2Fartikel%2F85870220&
This leads to a blank page https://{our-matomo-server}.de/matomo.php
We are using the following snippet:
<script type="text/javascript">
var _paq = window._paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.contentdomain.de"]);
_paq.push(["setDomains", ["*.contentdomain.de"]]);
_paq.push(["enableCrossDomainLinking"]);
_paq.push(["setDoNotTrack", true]);
_paq.push(['enableLinkTracking']);
_paq.push(['trackPageView']);
(function() {
var u="https://{our-matomo-server}.de/";
// Track ad content separately
_paq.push(['trackAllContentImpressions']);
_paq.push(['addTracker', piwikUrl = u+'matomo.php', 202]);
_paq.push(['addTracker', piwikUrl = u+'matomo.php', 203]);
_paq.push(['addTracker', piwikUrl = u+'matomo.php', 204]);
_paq.push(['addTracker', piwikUrl = u+'matomo.php', 205]);
// Track original page id
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '176']);
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>
<noscript><p><img src="https://{our-matomo-server}.de/matomo.php?idsite=176&rec=1" style="border:0;" alt="" /></p></noscript>
- all SSL-certificates are ok
- it works perfect at all devices if _paq.push([‘trackAllContentImpressions’]); is disabled
- not all devices are effected (e.g. iPhone IOS 13.6.1 or Chrome at Android 10 are working fine)
Any suggestion is highly welcome!