Adding event tags to links

3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 29, 2016   (RSS)

By Toledoh - August 28, 2016

Hi All,

I'm wondering if there is some automated way of adding event tags to links created via the WYSIWYG field?

ie.  If a user created a link, added a title (Sample Title), then selected a class that I've added via the wysiwyg_custom.css (.trackThis), could I then have the outputted link be

<a href='linkURL' onClick="ga('send', 'event', { eventCategory: 'Internal Page Links', eventAction: 'click', eventLabel: '$recordTitle', eventValue: Sample Title});">

Cheers,

Tim (toledoh.com.au)

By Toledoh - August 29, 2016

Thanks so much Djulia.  I'll look into getting that on my server and test it!

Cheers,

Tim (toledoh.com.au)