Your Matomo tracking code should look similar to this:
<!-- Matomo -->
<!-- SAMPLE CODE - DO NOT COPY THIS -->
<!-- COPY THE TRACKING CODE FROM YOUR MATOMO DASHBOARD -->
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//matomo/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
})();
</script>
<script src="//matomo/matomo.js"></script>
<!-- End Matomo Code -->
- Add the line _paq.push(['requireConsent']; just before the first line starting with _paq.push.
The resulting code should now look similar to this:
<!-- Matomo --> <!-- SAMPLE CODE - DO NOT COPY THIS --> <!-- COPY THE TRACKING CODE FROM YOUR MATOMO DASHBOARD --> <script> var _paq = window._paq = window._paq || []; _paq.push(['requireConsent']; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//matomo/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '1']); })(); </script> <script src="//matomo/matomo.js"></script> <!-- End Matomo Code -->
If you’ve successfully followed the steps in this guide then your website will now have both illow and Matomo working together, with illow managing all visitor consent and the Matomo JavaScript tracker only tracking visitors who have given consent to be tracked.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article