JS for GTM v2 element does not push event to dataLayer

I tried the following js provided by the support forum:

jQuery(document).ready(function($){ $(’.ga_event’).on(‘click’, function(){ ga(‘send’, ‘event’, { eventCategory: ‘download’, eventAction: ‘click’, eventLabel: ‘boek-1-demo’}); }); });

However, it is not passing the class to the data layer. It does work on the a column, but not on a V2 button.

Here is the page: https://www.mylittlelocal.co.nz/locals/download-apps/

Suggestions?

Hello Ben,

Thanks for writing in!

To make your JS script work with v2 button, please edit the page back in Cornerstone and then in your button settings, find the “Customize” tab and insert a custom ga_event class.

Hope this helps. Please let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.