Opt-out as a link which fits our layout

We are using a GDPR compliant extension in our Joomla installation and, as we are migrating away from GA, we already have a standard opt out text which at the moment uses a link to Google opt out explanation.

We would like to modify this link to let the user opt-out / opt-in but I’m not sure how to do this. Is there any documentation explaining how to integrate this function using a link?

I’m a Matomo noob, so please bear with me :slight_smile:

Any suggestions how to use a link for the opt-out function?

Hello Xavier Bit,

the Matomo own solution can you find in your Matomo administration page:
→ Privacy → users opt-out → HTML code to embed on your website
With this HTML code you can create a own webpage (Joomla page) and link to this.

Hi Melbao!

Thanks for answering and sorry for my late response, Carnival is on where I live and I was absent for some time.

I found this Youtube video https://youtu.be/VzHrsGXk_pA?t=67 which shows a button solutions for _paq.push([‘OptUserOut’]); and that would actually be the solution I’m looking for. Unfortunately the GDPR Module won’t parse Java Code and I’ll probably have to contact the dev.

If nothing goes, I’ll have to embed the rather ugly looking iframe into a Joomla page :wink:

Hi Xavier,

when you fit in JavaScript coding, you can code self an opt-out cookie function. The _paq.push([‘OptUserOut’]); is only for the users current session.

The most matomo users used the matomo opt-out cookie iframe or the link to the iframed webpage. But, everyone can code self an opt-out cookie function. The important by set the cookie is the name of the cookie. With this name it is possible to code a check function for the existens of this cookie. Is the cookie setted, than no Tracking, is the cookie not exist, than tracking. Its very simple.

First function (visible):

  • check function: is the opt-out cookie exist.
  • set opt-out cookie (button)
  • delete opt-out cookie (button)

Second function (hidden):

  • check function: is the opt-out cookie exist.
  • if exist: do nothing
  • if not exist: load the matomo JavaScript tracking code

The advantages:

  • it is not a third party cookie.
  • its a first party cookie.
  • this opt-out is in effect for each website autonomous.

Thanks for your ongoing support melbao!

I could solve it by creating a new Joomla article, changing the default editor to CodeMirror which enables the possibility to insert the Java Script snippet. Then I insert a link to it in the GDPR cookie text to this article.