Events Tracking in Google Analytics

I went through the tutorial to set this up (at Velo Tutorial: Sending Tracking and Analytics Events | Help Center | Wix.com) but I can’t see the events in analytics. My configuration is the following:
I have a button on one of my pages with the id of ‘downloadButtonNewbornBrochure’ which as its name says is linked to a file download. I placed the following code on the page:

// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import wixWindow from ‘wix-window’;

export function downloadButtonNewbornBrochure_click(event) {
wixWindow.trackEvent(“CustomEvent”, {
“event”: “Download”,
“eventCategory”: “Newborn”,
“eventAction”: “Brochure Download”
} );
}

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

In Google Analytics I have an Goal specified and enabled:
Custom goal
Goal name: Download
Type: Event
Category Equal To Newborn
Action Equal To Brochure Download
Label empty
Value empty

Use the Event value as the Goal Value for the conversion: yes

When I verify or test this button, no events are captured. Where have I gone wrong?

2 Likes

No one has this problem?

Did you configure Google Analytics etc per this page:
https://support.wix.com/en/article/about-tracking-tools-analytics

I am having the same issue right now. If you found the solution please share

I am having the same issue as well

Have you found the solution?

Is there a fix for this yet? I’m having the same issue with the code below. Nothing is showing in my Analytics account.


import wixWindow from 'wix-window';

export function btnPhone_click(event) {
  wixWindow.trackEvent("CustomEvent", {
 "event": "General Call",
 "eventCategory": "General Call",
 "eventAction": "Phone Call",
 "eventLabel": "General Call"
} );
}

I’ve setup the click event on the button and connected Google Analytics in the dashboard.

@Yoav (Wix) Could you please confirm if the following tutorial has been tested and is working?Velo Tutorial: Sending Tracking and Analytics Events | Help Center | Wix.com

There seem to be quiet a few people with the same issue.

Thank you

Hello, The article is well done. But, still does not work for me. Can you check my code?

import wixWindow from ‘wix-window’ ;

export function button1_click(event) {
wixWindow.trackEvent( “CustomEvent” , {
“event” : “Document Download” ,
“eventCategory” : “Downloads” ,
“eventAction” : “Download” ,
“eventLabel” : $w( ‘#dataset1’ ).getCurrentItem().title
} );
}