Tracking Custom Goals
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.
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.
Solved! Go to Solution.
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'
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.
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.