Download button tracking not working

Dear all,

few days ago I tried to add a code on my site that theoretically should allow google analytics to track how many times users clicked on a specific download button (to download an ebook).

I followed instructions on a wix official video on YT, followed step by step and entered the suggested code, but so far no tracking of any event on my site, even though I tested it out by downloading the ebook on different devices. Any help please? thank you


Corvide code area looks like this now, new code is bold:

// For full API documentation, including code examples, visit Velo API Reference - Wix.com

$w.onReady(function () {
//TODO: write your page related code here…

});

import wixWindow from ‘wixWindow’;

export function downloadButton_click(event) {
wixWindow.trackEvent(“customEvent”, {
event: “Funnel”,
eventCategory: “e-book-downloads”,
eventAction: “Downloads”,
eventLabel: event.target.label,
}) ;
}

website address: uniqsounds.com

It would probably be easier for you to follow the tutorial in writing than through the youtube video.
https://support.wix.com/en/article/corvid-tutorial-sending-tracking-and-analytics-events

Wix Support has their own area for Google Analytics that you can read.
https://support.wix.com/en/marketing-tools-analytics/marketing-integrations-tracking
https://support.wix.com/en/marketing-tools-analytics/google-analytics

https://support.wix.com/en/article/about-marketing-integrations
https://support.wix.com/en/article/adding-your-google-analytics-tracking-id-to-your-wix-site
https://support.wix.com/en/article/tracking-click-events-with-google-tag-manager
https://support.wix.com/en/article/adding-your-google-tag-manager-account-id-to-your-wix-site

@givemeawhisky Thank you so much, thanks to the resources you posted I managed to adjust the code and now it’s working.

@mattgiabbani so what was the solution?
I’m having the same problem but couldn’t find a fix yet.

I have the same problem but didn’t manage to fix it. When I add the code, my download button doesn’t work anymore. I read the links and nothing.
Any ideas?