Google Analytics Event Tracking

Hey there,

So, I’m trying to get a custom event triggered on a specific form.
However, nothing seems to be picking up on GA.

This is my code so far:
export function wixForms1_wixFormSubmitted ( ) {
wixWindow . trackEvent ( “CustomEvent” , {
“event” : “Lead” ,
“eventCategory” : “Lead_generated” ,
“eventAction” : “MainPage_Lead_Generated” ,
“eventLabel” : “Lead” ,
“eventName” : “MP_Lead”
} );
}
I’ve also tried changing it to be on the button click (in the form), but neither seems to get picked up on GA.
So far, I’ve managed to create custom events using Tag Manager, but I can’t use Tag manager here since there are multiple forms, and I want a different event for each form.
Unfortunately, there’s no ‘thank you’ page, so I can’t track that either.

My last resort would be to try tracking it based on an element coming into the viewport (thank you message in the WixForm), but I’m not sure that’ll work either.

Would anyone be able to spot what it is I’m doing wrong?

Edit: I’ve also tried creating an event on analytics that’s based on those parameters, but it doesn’t seem to be capturing anything at all.

Would be really helpful if someone could show me a functioning example of code for a similar feature.

hey there
I will double my reply on this, but still since we want every user to receive the assistance, for questions which is not related to the Editor X platform and creational tools, we can suggest to reach out to the relevant team in Customer Care on SEO questions:
https://support.wix.com/en/article/contacting-wix-customer-care-for-support

you can share the finial result here, once you will receive the reply from their side