events tracking with google analytics

Hi am trying to append a link on my landing page with the GA event tracking code so that it looks like the snippet below. However, every time I save the module and edit it again to double check it is still as intended, the onClick=“ga(‘send’, ‘event’, ‘Referral’, ‘Click’, ‘GooglePlay’);” part has been removed. Am i doing something wrong?

additionally how would i edit the url link of an image to be the below? it doesn’t seem like i have enough editing capabilities beyond the module customiser?

googleplay

thank you!

<a href="https://play.google.com/store/music/album/Richard_Lawrence_Kevin_Kendle_Rise_Peace_Meditatio?id=Brdnnxwcl4ljmyxurga7bpf4pi4&hl=en_GB" onClick="ga('send', 'event', 'Referral', 'Click', 'GooglePlay');">googleplay</a>

Hey Darren,

I’ve just tested the code on my local end and it’s working fine. Could you try the code on an HTML module instead of the text editor module? Let us know how it goes. :slight_smile:

Thanks!

KC