Rich-text Reply

How to setup a custom goal

brettdc 11-04-16

How to setup a custom goal

I'm trying to create a goal for all of my sales pages. I want to basically track which sales page leads to a sale. 

 

So basically enter the URL I want to split test and then set the conversion as people reaching a certain destination URL. 

 

Trying to figure out how to do that. 

 

Thanks

 

Brett

Level 2

robertchan 11-08-16
 

Re: How to setup a custom goal

Have a look at creating a multi-page funnel experiment (https://help.optimizely.com/Build_Campaigns_and_Experiments/Create_multi-page_funnel_experiments_in_...). On the page you consider a conversion, create a custom goal like so:

 

// ensures the optimizely object is defined globally using
window['optimizely'] = window['optimizely'] || [];

// sends a tracking call to Optimizely for the given event name. 
window.optimizely.push(["trackEvent", "eventName"]);

You can learn more about custom goals here: https://help.optimizely.com/Measure_success%3A_Track_visitor_behaviors/Custom_event_goals_in_Optimiz...

Robert Chan

Experimentation Hero
brettdc 11-11-16
 

Re: How to setup a custom goal

Hey robert. thanks for the reply. I haven't looked at everything you posted just yet. But if I wanted to track how many sales a page was generating? Would that be a custom event?
Level 2
robertchan 11-11-16
 

Re: How to setup a custom goal

I would create the custom event, yes.
Robert Chan

Experimentation Hero
brettdc 11-11-16
 

Re: How to setup a custom goal

Hey Robert - this stuff is pretty foreign to me. Basically I want to know if this sales page: http://go.ultimatehitter.com/power-hitting is generating sales. I don't need to know the revenue. I just want to track whether or not they reach my confirmation page (which would mean they bought something). So people would land on this page, click to buy the product, go to the order form, and then land on the confirmation page if they purchased. I'm still lost with how I set that up.
Level 2
robertchan 11-14-16
 

Re: How to setup a custom goal

Please refer to the link I sent previously to the Optimizely article, but to summarize it, here are the steps you need to take:

 

1) Create a Multi-Page experiment with the URL for whatever page your users enter the funnel

2) Click 'Add Page' to continue adding pages that belong to your funnel including the sales page

3) On your sales page, open the Variation Code, and copy and paste the following:

 

// ensures the optimizely object is defined globally using
window['optimizely'] = window['optimizely'] || [];

// sends a tracking call to Optimizely for the given event name. 
window.optimizely.push(["trackEvent", "eventName"]);

4) Edit your goals and add a custom event goal. The custom event goal corresponds to the 'eventName' you input into the Variation Code

 

--

 

Your experiment will now measure the number of times visitors hit the sales page.

Robert Chan

Experimentation Hero