Integrating analytics, onclick function
-
Hello
I’m using your plugin for some time, it’s simple and fully functional, great work overall.
Now I want to integrate onlcick function, so every time someone clicks the button it sends data to GA so I can track events.This is example of how the function is implemented in a standard link:
<a href="https://test123" onclick="ga('send', 'event', 'link', 'click', 'Test button clicks');">Test link 123</a>
Now I tried putting it like this in your form
<input type="submit" value="Sign up" / onclick="ga('send', 'event', 'button', 'click', 'Subscribed mail');">
But it seems it doesn’t work, the subscribe button works but it doesn’t send events to GA.
Can you tell me where should the code snippet be placed so it will function ?
- The topic ‘Integrating analytics, onclick function’ is closed to new replies.