Rich-text Reply

Custom Event Tracking with parameters

mrcthms 08-10-15

Custom Event Tracking with parameters

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

Level 2

JMarchant 08-10-15
 

Re: Custom Event Tracking with parameters

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.

James Marchant
Senior Developer at Conversion.com

 

Re: Custom Event Tracking with parameters

[ Edited ]
wrong account - see below
tomfuertes 08-10-15
 

Re: Custom Event Tracking with parameters

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.


Experimentation Hero
mrcthms 08-14-15
 

Re: Custom Event Tracking with parameters

Hi James, 

 

Thanks for your reply! Will look into using the custom dimensions method, sounds promising!


Marc

Level 2
mrcthms 08-14-15
 

Re: Custom Event Tracking with parameters

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

Level 2