Hi,
I am trying to get GA event tracking enabled in CFv6. In the forums I see the use of data-gvalidate_success but when implemented it doesnt track anything inside GA.
I use following JS in Javascript custom code block:
Then in form display section I added
data-gvalidate_success:ga_track_event
to the form tag attributes box
All code is loaded in front-end, just de ga_track_event function doesn't get fired.
Please help, regards,
Mark
I am trying to get GA event tracking enabled in CFv6. In the forums I see the use of data-gvalidate_success but when implemented it doesnt track anything inside GA.
I use following JS in Javascript custom code block:
function ga_track_event(event, form){
console.log('tracking fired');
ga('send', 'event', 'verzend-contact-formulier', '<?php echo $this->get("pagesection","home"); ?>', '<?php echo $this->get("parent-url","home"); ?>');
}
Then in form display section I added
data-gvalidate_success:ga_track_event
to the form tag attributes box
All code is loaded in front-end, just de ga_track_event function doesn't get fired.
Please help, regards,
Mark