Google Analytics for LeadIn
-
Hi Andy!
I would like to ask if it is possible to get some help with pasting the code for Google Analytics Event Tracking into LeadIn plugin php. I set up subscription through the LeadIn Pop Up as one of the goals in Google Analytics. So I need to add the following code to the Plugin Code: onClick=”ga(‘send’, ‘event’, { eventCategory: ‘Blog’, eventAction: ‘Subscription’, eventLabel: ‘Clicked’});” in order to track when somebody press Subscribe button.
Usually it looks like that:
<input id=”contact-submit” class=”button” type=”submit” value=”Submit” onClick=”ga(‘send’, ‘event’, { eventCategory: ‘Blog’, eventAction: ‘Subscription’, eventLabel: ‘Clicked’});”>
But when I tried to paste it in to pop up widget.php in the button code, the whole site went down and I got syntaxis error because of that. Any help would be greatly appreciated.
I also tried pasting
jQuery( “.vex-dialog-button-primary” ).click(function() {
ga(‘send’, ‘event’, { eventCategory: ‘Blog’, eventAction: ‘Subscription’, eventLabel: ‘Clicked’});
});to the theme header and tried to test it but it doesn’t seem to work, I don’t see the statistics in the GA. Do you think maybe it should be placed somewhere under plugin edit?
Any help would be highly appreciated.
Thanks for the great plugin!
Best,
Kate
- The topic ‘Google Analytics for LeadIn’ is closed to new replies.