Custom Event Creation to Track Submissions
I'm trying to create a custom event under one of my experiements to track submissions rather than using submission clicks.
I'd appreciate if you can show me how to add a custom event goal for my experience. Just to let you know the page link I'd like to track is: https://complyadvantage.com/pep-list/
PS: We don't have a success or thank you page
Thanks for posting your question here. Optimizely doesn't auto-generate this code; you'll have to write this yourself.
What are you exactly trying to do: what is a submission? Looking at the page https://complyadvantage.com/pep-list/, would you like to track views of this page? Or clicks on a certain button? If you're looking to track pageviews of this page, you can have a look at the article here.
As for the custom event, to help you along: looking at your document, the "submission" is the custom event to track. In order to track this custom event, you need to use this line of code:
// sends a tracking call to Optimizely for the given event name. window.optimizely.push(["trackEvent", "eventName"]);
Here you replace the "eventName" with the custom event to track: "submission". Then you'll have to make sure you execute this conversion call only when you want to.
I hope this helps!
Thanks for the reply, a few things still need clarification.
1 - Submission: someone fills the form.
2 - I'd like to track people who submit the form.
// sends a tracking call to Optimizely for the given event name.
You can ask your colleague if they can write you code that executes the code whenever a submission has gone through successfully. Code below:
// sends a tracking call to Optimizely for the given event name. window.optimizely.push(["trackEvent", "submissions"]);
I hope this helps!
Thanks for getting back to me, our developers will add the code. I'm still confused about the tracking process but let me add the code and test it
We couldn't figure out how to get this done. We're now doing split testing using different URLs so we won't need anymore what we've asked before. However, this time we've got another issue which I will raise under different topic
Thanks for your support.