Matomo OptOut Source Code

Hi,
i am trying to add the Matomo "OptOut" Code to my site.
The code looks like:

<script src="https://my-matomo-site.org/index.php?module=CoreAdminHome&action=optOutJS&div=matomo-opt-out>\

The problem I have:
After adding it to my page (source code view), the script part is deleted/stripped from the site and only :

remains.

Any idea how to add the code to a page (in my case it is the Datenschutzerklaerung)?

Cheers
Ralf

Comments

  • acrylian Administrator, Developer
    edited October 3

    Please escape your code examples properly as currently we cannot see anything.

    Generally TinyMCe may strip JS code. In any case if you are using the include Matomo plugin you can just use the content macro MATOMO_OPTOUT

  • Ralf Member

    Hi Acrylian,
    what happens is that everything in the script statement is deleted from the code (including the script tag).
    Will try the content macro.,

  • acrylian Administrator, Developer

    There are two things. First TinyMCe might do that if enabeld and also ZP clears everything that is not in the allowed tags list.

    But anyway, we have the content macro for that purpose because it is of course simpler and will get automatic updates if things change (which they did a few months ago from the Matomo side)

  • Ralf Member

    The content macro did the thing :-)

Sign In or Register to comment.