The Tag Manager automatically loads Meta/Facebook’s Pixel tracking scripts when ‘Facebook Pixel’ tags are triggered. I’ve set up Matomo to not collect any PII. As such it’s not necessary to ask users to opt in to analytics, only for third party tracking, AFAIK. So I want to:
- Load Matomo immediately on page load
- Only allow Facebook Pixel tags in tag manager to be triggered when the visitor has opted in.
I’m thinking of setting up custom JavaScript to achieve this, but it seems a bit convoluted for what appears to be rather common behavior. After all, almost every website now has a cookie banner! Am I missing something in Matomo/Tag Manager?
I found a German blog post outlining how to base triggers on cookies. I don’t want to base a trigger on a cookie though, because the cookie should change once the visitor opts in to the third party tracking and cookies are only read upon page load, so the tracking would only start on subsequent page views.