CybotAS / CookiebotWP

This repository contains Addons that will make other plugins work with Cookiebot.
https://wordpress.org/plugins/cookiebot/
GNU General Public License v2.0
37 stars 25 forks source link

WP Piwik prior consent #170

Closed mathias-heilmann closed 3 years ago

mathias-heilmann commented 4 years ago

I use https://wordpress.org/plugins/cookiebot/ 3.7.1

With the current plugin of https://de.wordpress.org/plugins/wp-piwik/ (1.0.22) the script output is not correct:

<!-- Matomo -->
<script type="text/javascript">
  var _paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['trackAllContentImpressions']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="https://xxx.xxx/";
    _paq.push(['setTrackerUrl', u+'piwik.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.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->

My settings are:

I also use use https://de.wordpress.org/plugins/ga-google-analytics/ (20200325) and this is working as expected:

<script type="text/plain" data-cookieconsent="statistics" async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-1"></script>
<script type="text/plain" data-cookieconsent="statistics">
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-XXXXXXXX-1');
</script>

Is this a configuration issue?

aytackokus commented 4 years ago

Hello @ovangmbh ,

Can you please send us the screenshot of the Enable tracking tab? Besides that, can you also share the URL?

Take care,

Aytac

clausjensen commented 3 years ago

Hi @ovangmbh Since we haven't heard anything back on this issue we'll be closing it for now. If you're still having trouble, please provide us with some details and we can reopen the discussion.