Rich-text Reply

Tracking Custom Goals

mattrobbux 09-13-16
Accepted Solution

Tracking Custom Goals

Hi all,

 

I am slightly confused by something.

 

I have set up a test where I have included 4 custom goals, ranging from when a user clicks on a video play button to then a user clicks on a submit button.

 

Ive set up all the tracking as in the Experiment Javascript settings - screenshot attahced.

 

I have then made sure that I can only see the test by means of a cookie in order for me to test whether everything is tracking correcetly.

 

I click on each of the elements I have trakced hwoever in the results panel I see that it only registers the first element I clicked on.

 

I would expect to see all goals shwoing one conversion for where I have clicked.

 

Any help would be much appreciated.

 

Thanks

Matt

mattrobbux
Edit  Test within a Test.png
inigam 09-13-16
 

Re: Tracking Custom Goals

Hi Matt

 

Not sure wat you are trying to do so please excuse if below is not relevant

First, is there a reason you cannot use the standard Goal Tracking? if you are looking to get report on users clicked?

 

In this case though, I would  

- Check for child elements under parent elements.
- Why defining the window['optimizely'] repeatedly ? or either put this under the functions.

- Unrelated but Why this code needs to be in Experiment JS and not in Variation JS?

- Probably use a 'click' instead of 'mousedown'

 

Regards

IN

Regards,
IN


Level 6
mattrobbux 09-13-16
 

Re: Tracking Custom Goals

Hi Inigam

 

Thanks for getting back to me so quickly.

 

I have used the standard click tracking in the past which works fine. I was just testing custom event goals where for example an element was loaded only after pageload or where I wasnt able to target the element in the Editing mode.

 

- I will double check about child and parent elements to see if im targeing them correctly.

- I assumed you had to define he window['optimizely'] for each specific custom goal I set up but if thats not the case then will only define once.

-I was told that this was the most accurate way of tracking, I did used to out the code within each variation JS. Would you recommend that way?

- I agree, using click now.

 

Thanks again

Matt

mattrobbux
inigam 09-13-16
 

Re: Tracking Custom Goals

Okay Let me know if you can get to do what you were looking for.

It doesn't matter Exp JS. But in my experience so far variation code is further late to fire, so can take care of load side of things.

Else you can put some conditions like element.length, or to go over the top add an observer.

Cheers
Regards,
IN


Level 6
mattrobbux 09-13-16
 

Re: Tracking Custom Goals

It seems to be working now.

I tried using conditions like element.length and that worked!

Great help.

Best
Matt
mattrobbux