Can you disable click tracking of privacy policy links in emails?

My Mautic version is:4.2.1

We send out a number of emails and they all contain links to our privacy policy. Is there a way to stop Mautic from tracking clicks in emails to these (privacy policy) links so they don’t show up in the reporting and only track clicks on the call to action?

Hi, here is an underrated, underdocumented feature in Mautic.

You can disable certain links by adding the mautic:disable-tracking="true" attribute to the link in the html code.

Your link before:
<a href="myevilcorporation.com/wewillspamyou">Privacy Policy</a>

Link not to be tracked:
<a href="myevilcorporation.com/wewillspamyou" mautic:disable-tracking="true">Privacy Policy</a>

Good luck to you :slight_smile:

3 Likes

Thank you!
That will make life so much easier

My Mautic version: 4.4.1
PHP Version 7.4.29
10.3.34-MariaDB-0ubuntu0.20.04.1

I suppose you are adding the additional mautic:disable-tracking="true" code in “code-mode-template” of the email:
image

Is there the possibility to add this option using the GrapesJS-Editor or the Classic-Editor?

I tried:

  1. using the GrapesJS-interface: there is no option to add this additional code:
    image

  2. using the Edit-code button, I inserted the option inside the mj-element like this:


    But it seems the tracking is not disabled for the links. I sent the email to a test-segment. The email statistics includes also those links:

  3. I do not see another method by still using the GrapesJS-Editor. Would the Classic-Editor have this option?

To “downgrade” all the emails to using code-mode would be … annoying.

You inserted the attribute to the image, not the link.

Yes, but there is no <a> tag in the mjml-code.
I take your answer as: with GrapesJS-Editor cannot work.
Therefore I will try to change to Classic-Editor.

You can still use the anchor in text links.
Maybe it would make sense to play around with

<mj-raw> 
  YOUR CUSTOM CODE
</mj-raw>

Something new learned: how is the block <mj-raw> to be used. Thank you Joey !

Unfortunately, the tracking is still there.

  1. I added the attribute on the first image appearing by default when inserting the mj-raw block:

  2. I checked that the attribute was saved - passed.

  3. The email is a segment email. The segment is a test segment, where I manually add email-address.

  4. Sent the email to the added contact in segment.

  5. Checked in outlook the email link:
    image

So the attribute does not work either with the mj-raw .

I am checking with the classic-editor.

I’m sorry that didn’t work. I don’t have better idea now.

Confirmation: :white_check_mark: it works with classic-editor.
I suspect that the link with the attribute must not exist anymore inside the email without the attribute, otherwise I suppose it will not work - it would have also no purpose then.

I wanted long ago to revert to classic-editor, as I find GrapesJS-Editor so buggy. This is the moment!

Is there still no solution for this problem? I’m using the GrapesJS editor, and it’s mind-boggling that something this trivial is not working.

I’m trying to add a custom link, which is saved inside a field in Mautic, to a button. However, every time I add the token to the button and send out the email, the customer receives a broken link because the tracking code is also added to that link. I haven’t found any way to solve or work around this issue.

this is not working in Mautic: v3.1.0
Email editor with code editor is not able to save changed.
cab anyone suggest better solution.
also disabled from here:

You are using a very old system, you should upgrade.

1 Like

Does this still work? In my tests in Mautic version 6 it did not work.

I found the problem:

The syntax of the existing tag is not HTML conform, so it can lead to problems. Therefore, I propose we introduce the same parameter, but in an HTML conform way. For e.g. version 7 we can keep both variants around. And then maybe with version 8 we remove the old syntax?

Hello, test

becomes now:

Hello, test

@rahul.shinde will open a PR shortly.

You can disable tracking for certain links by adding mautic:disable-tracking="true" to the anchor tag works well for privacy policy links.

Hello,

I am using mautic:disable-tracking=“true” in anchor tags on M6.0.3 and its works well.

However if you put it inside a mj-button it does not disable link tracking in the button which is a real shame as what else is a button used for i.e. linking to urls ?

If you define it inside an mj-button then all anchor tags were it is defined underneath in the code link tracking starts working again until you remove it from the above mj-button.

Looks like the Mautics html sanitiser detects it inside a mj-button and disables it use everywhere thereafter which must be a bug.

Having mautic:disable-tracking=“true” work inside a mj-button would be a very useful thing indeed. Can I reach out to a developer to look into this issue.

Does anyone else in the community agree ?

Thanks

Hello,

Update.

My scenario - I have:
Url links pointing to websites that have link tracking support.
Url links pointing to websites that don’t currently have link tracking support.

Therefore I need to be able to disable link tracking about 50% of the time.

I am using mj-buttons and anchor tags so I have to turn off all link tracking on the mautic server at the moment which is a real shame.

Yes I have seen mj-text and mj-raw solutions which are workarounds for mj-button. My view is why not fix the html code sanitiser to allow the use in mj-button as well rather than always using workarounds.

Thanks.

@andrew_c3 did you find out, if this is a Mautic or GrapeJS issue or an issue with MJML itself?
Then it would be good, if you’d create an issue in either of the projects…

Thanks a lot!

Hello dirk_s,

I write the code for my themes and emails manually by hand.

I don’t use the GrapesJS builder therefore it must be a Mautic issue.

What I’m asking for is new support for mj-button therefore I have posted a new feature request for the developers to consider.

Thanks.