YETT blocks Tracking also after yett.unblock
Opened this issue ยท 3 comments
Hey Guys! I have a question and I hope you can help me. I have tried to use YETT to block all cookies on our website, until the user presses "Ok" button. After pressing the button i do a yett.unblock() like it is explained in your readme. It also works with unblocking the cookies and all the scripts from the YETT_BLACKLIST.
But the problem that we are having now is that altough all cookies are unblocked on the website, the tracking in Matomo and Google Analytics does not work. Can you explain why?
Thanks in advance for your answer and your help!
Greetings from Germany!
@yahyapervaiz @parwissmark Thanks for reporting the issue, and sorry for the delay.
I tried to reproduce by doing the following:
- Created a free Matomo trial account.
- Copy pasted the provided script.
- Used a
YETT_BLACKLIST
with regexp:/cdn\.matomo\.cloud/
- Unblocked the script after page load:
yett.unblock('cdn.matomo.cloud')
After unblocking, I can see that the scripts downloads fine, registers a global Matomo
object, makes a POST request to my matomo cloud domain and I can see that the visit gets registered fine.
Maybe there is something I am missing here?
For the record here is the script I copy pasted:
<script type="text/javascript">
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://yett.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.src='//cdn.matomo.cloud/yett.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
Hi, we found our error, it wasn't connected to Yett, i removed my comment. Matomo registers an object to window.Matomo. Our checkbox/whitelist for Matomo had the same ID, so we just changed the ID on our side, everything works for us now. We are also running GA and that works as well.
Thanks for replying.
Hi, we found our error, it wasn't connected to Yett, i removed my comment.
Great! Closing the issue then ๐.