Rich-text Reply

Custom event

felipegomesbwm 01-11-17

Custom event

I need to create an experiement that I'll test change the payment options order (credit card or bank):

Original: Bank is the first option and credit card is the last

Version #1: Credit card is the first option and Bank is the last


But I also need to track which type of payment the user selected in both. If I saw the version 1 and made a purchase by credit card and another visitor saw the original and selected credit card, I need to know this in both case, when visitor see original or version #1.


Can somebody help me with this?


Thank you.

Re: Custom event

For custom events yo need to create a Thank you page for every single event
Landing Page A > Checkout Form > Thank You for your purchase
Landing Page B > Checkout Form > Thank You for your purchase

Those thank you, pages needs to have two scripts (the events script and the experiment script)

Then I should recomend you to create a click tracking goal for every button in your pages in order to have
a better understanding of your customers/users and implement a heatmap is a great idea (Hotjar and Crazyegg are good options)

SEO and CRO Specialist
JDahlinANF 01-13-17

Re: Custom event

As mentioned in the first reply, goal on the thank-you page may be the most useful.


Another way of doing it would be to create a dimension for "payment_type" and when the user selects a payment type, set the value.  This would then let you segment your results by "payment_type=bank" vs "payment_type=creditcard".

Breana_Eads 01-20-17

Re: Custom event

@Roman-Delcarmen custom goal is a great way to track individual events that happen in your experiment. Any goals you set up in an experiment will record for all variations within the experiment, as long as the target element the goal is connected to is available in all variations.


There is another method available if you are using Optimizely X know as Custom Attributes, or Custom Dimensions if you are using Classic Optimizely. Unlike an audience condtion that filters who qualifies for an experiment, an attribute or dimension segments the data from your experiment by a trait, event or behavior your visitors makes in your experiment.

For example in your scenario, you can set up a custom attribute or custom dimension to identify the type of payment that was made by your visitor. Then in your resuts page you can look all the goals set up for your experiment and view just the visitors that used a credit card as a form of payment. This method can offer a broader view of visitor behavior if you are tracking several goals in your experiment.


Both these methods will require custom code on your part. Below are the articles from our knowledge base that goes into greater depth on how to set up each feature.

Optimizely X- Custom Attribute


type: "user",
"customUserDimension" : "User Attribute",

Classic Optimizely - Custom Dimension


window['optimizely'] = window['optimizely'] || [];
window['optimizely'].push(['setDimensionValue', 'dimensionId/Name', 'value']);


Breana Eads

Re: Custom event

Thanks for your help @Breana_Eads I have to study the Optimizely X (manuals, guides and so on)
can you give some advice because I'm planning to take the exam.
SEO and CRO Specialist
Breana_Eads 01-25-17

Re: Custom event

@Roman-Delcarmen I will respond to you directly. 

Breana Eads