Rich-text Reply

Alternative for URL's when setting up goals

AG 04-08-16

Alternative for URL's when setting up goals

Hi,

 

I have a question regarding how to set up goals, when I don't have an unique URL. Sometimes it happens, that I can't use my URL to identify a Pageload as a goal, because it has to many only dynamic parameters.

 

I know, that instead of the URL, it is possible to use an identifier to identify a page. For example I can identify the productdetailpage with the Add2Cart button code, because this code and button only appears on this page, But I couldn't identify it with e.g. the header code, because the header is on every side of the website.

 

So my question is, if I find an identifier to identify a page, where is the possibility to use this in optimizely? I know how to include Clicks and URL-Pageloads, but how can I do it with an Identifier?

 

Thank you and kind regards

AG

AG
Level 2

JasonDahlin 04-08-16
 

Re: Alternative for URL's when setting up goals

@AG - For this, you can set up "Custom Event Goals"

 

Here is a Knowledge Base article on them

https://help.optimizely.com/hc/en-us/articles/200039925

 

In a nutshell, you will write code that looks for the identifier on the page and when it finds it, it sends the custom event to Optimizely.

 

For one of the sites I work on, I am unable to use URL targeting *at all*.  For this reason, I need to look at the actual HTML of the page to determine what type of page the user is on and then re-act accordingly.  Here is an example of how I record "Order Confirmation" in this situation.

if ($('body#order_confirmation').length > 0) {
  window.optimizely.push(["trackEvent", "OrderConfirmation"]); 
}

 

 

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
AG 04-08-16
 

Re: Alternative for URL's when setting up goals

Hi Jason,

totally cool, thank you very much for your help.Smiley Happy

Kind regards
AG
AG
Level 2