Needed Javascript code to a cookie plugin

I use Matomo on a Wordpress website and have installed the plugin. I have also installed a cookie notification plugin in accordance with EU law and need to enter Javascript in that plugin to disable non-functional cookies. This means that I need to enter Java code for Matomo as well.

I know nothing about Javascript and have no idea what code to enter. I have looked at the provided info on the Matomo site, but did not find the answer I need.

@WP_PiwikDev Can you help with this?

No, sorry. This depends on the Cookie Notification Plugin and how it is used. I could imagine that it offers some JavaScript wrappers to capsule the non-functional cookie code… e.g.

cookieplugin.addNonfunctional(function() {
   <!-- Piwik Tracking Code -->

or that it allows to manage the JavaScript snippets via dashboard.

But anyway, this should be mentioned in the Cookie plugin’s documentation. Because every plugin is different, it’s not meaningful to integrate this into WP-Matomo.

1 Like

I still do not get how to solve the issue. I have uploaded the description of what to do from the cookie plugin. I do not get what I have to fill in for Matomo. Please, is there anyone that can supply me with the correct code?