- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Custom Event Tracking with parameters
Custom Event Tracking with parameters
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
I'm working on an E-Commerce, and I want to add a Custom Event Goal to determine how many of a particular product was ordered.
I can see how easy it is to track the revenue from an order, but I'm wondering if it's possible to track other custom goals with valued parameters, something like this:
window.optimizely.push(['trackEvent', 'totalProductsBought', { count: 3 }]);
There is documentation for how to set up a Custom Event Goal, but I couldn't find anything on passing additional data to the goal, like you can with the revenue goals.
Is this possible as a custom event goal? Or if not, is it possible to track in another way.
Thanks!
Marc
Re: Custom Event Tracking with parameters
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi Marc,
Unfortunately, apart from revenue tracking, you can't pass through a value for a custom event. I would suggest instead to use a custom dimension, where you can define values:
window.optimizely.push(['setDimensionValue', 'totalProductsBought', 3])
You'll first need to create it before the values can be passed through of course.
Re: Custom Event Tracking with parameters
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Re: Custom Event Tracking with parameters
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi Mark!
This is a reat time to also look at passing information to a third party analytics tool via one of optimizely's integrations OR just using `revenue` as the `count` on this one.
Integration Docs: https://help.optimizely.com/hc/en-us/articles/203729580-Introduction-to-Optimizely-Integrations
Code Snippet:
window.optimizely.push(['trackEvent', 'order-placed', { revenue: 3 // them revenue count === total products }]);
Hope that helps!
- Tom Fuertes | CTO @ CROmetrics / LinkedIn
"Most Impactful Use of Personalization" and "Experience of the Year" Optie award winner.
Re: Custom Event Tracking with parameters
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi James,
Thanks for your reply! Will look into using the custom dimensions method, sounds promising!
Marc
Re: Custom Event Tracking with parameters
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hey Tom,
I had thought of this, but we're already tracking revenue as well. It's no biggie though, it was more of a nice-to-have then a necessity!
Thanks,
Marc