• Resolved Excel1

    (@excel1)


    Hello,

    by using the plugin it is possible to enable the opt-in feature. If users opt-in additionally code will be loaded.

    But is there a possibility to load definitely some code or this code?

    In reference to matomo you can use tracking with setting cookies or without:

    With Cookies

    <!– Matomo –>
    <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://mywebsite.com/&#8221;;
    _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=u+’matomo.js’; s.parentNode.insertBefore(g,s);
    })();
    </script>
    <!– End Matomo Code –>

    without cookies:

    <!– Matomo –>
    <script type=”text/javascript”>
    var _paq = window._paq = window._paq || [];
    /* tracker methods like “setCustomDimension” should be called before “trackPageView” */
    _paq.push([“disableCookies”]);
    _paq.push([‘trackPageView’]);
    _paq.push([‘enableLinkTracking’]);
    (function() {
    var u=”https://mywebsite.com/&#8221;;
    _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=u+’matomo.js’; s.parentNode.insertBefore(g,s);
    })();
    </script>
    <!– End Matomo Code –>

    The difference:
    _paq.push([“disableCookies”]);

Viewing 1 replies (of 1 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @excel1,

    You can add the code that can be loaded without consent directly in your theme and add the code that is required to be managed based on consent via our plugin’ non-necessary script input field.

Viewing 1 replies (of 1 total)

The topic ‘Matomo Tracking Cookie’ is closed to new replies.