Track Button with # link

Hey!

I want to track the click on an anchor element with a “#” link.
image

My Tag Setup is this:

And my Trigger is this:

But that didn’t work so i tried to set it up just with the Click Classes condition or just with the Click URL condition. And also the condition to fire on all clicks.
But all that didnt work.
Other Button from the Website work.

Can Piwik track link clicks with # at all?
Thank you in advance.

Best regards
Lasse

hi @Lasse_Offt
to investigate your case can you share the address of your page where you want this trigger to work?
Tymek

1 Like

Hey, this is the Website:

And that’s the button:
image

hi @Lasse_Offt
I checked with our devs and we don’t have the support for it yet, but we may have come up with a workaround for you. You can modify the handler but will require a bit of coding though.
For the event, there are two methods available stopPropagation and preventDefault. The aim would be to call preventDefault only.

On a side note: it was noticed you are using two containers at this same time (GTM and Piwik PRO) in one DataLayer object, we advise changing the default name, here’s how to do it: Custom data layer name — Piwik PRO Analytics Suite 16.33 documentation
Tymek

1 Like

Thanks for your help! @TymekGF

1 Like