The button has a link but I want it tracked every time it is tracked. I did check the trackEvent() but didn’t understand how to implement it. Can someone please help me?
export function button8_click(event) {
//Add your code for this event here:
}
so my on click tracking pixel is i.jvzoo. com/0/3595/99
Most events doesn’t have any link option, so I’m confused.
I had a download link (excel) and tracking working fine.
Changed to a download button connected via a dataset, as per the tutorial you reference, and now it fails:
If I enable the onClick event handler of the download button (which points to the wixWindow.trackEvent), then the Google tracking fires fine, but the document (excel) is not offered for download.
If I disable the onClick event handler of the download button, then the document downloads fine, but the Google event does not fire.
So, I can have the document download, or the tracking, but not both.
The tutorial suggests that you can have the button connected via the dataset, AND you can add an onClick event handler for the tracking - and both should work.
@ghobashy
The tutorial is crap - epic Wix fail.
I’ve run into bad tutorials before, and always got them to work in the end, after tinkering and avoiding the errors or differences in configurations in the tutorials.
Not this one.
Wasted a ton of time on this and finally gave up.
If you or anybody else have some insight, please share it.