Rich-text Reply

Time on page goal

rafael 08-28-14

Time on page goal



I'm trying to use the user time on page as a goal. However, I can't see a native way to do that on optimizely. I read in another post that I could use google analytics to track that, but I looked at google analytics integration documentation and I couldn't find a way to make a GA dimension to become a goal. It seems like I can see how long the user was on page on each variation, but I would lose optimizely's features of displaying me nice graphs with confidence intervals and so on.


Moreover, can I integrate optimizely with old google analytics (not universal analytics)?

Level 2

michaelwei 08-28-14

Re: Time on page goal

Hi Rafael,

While there's no native way to do that on Optimizely, you can create a custom goal that fires off a conversion after reaching a certain time. You'll need to add some custom javascript on your page to count the time, then use our Javascript API to fire off a custom goal.

You can do this in Google Analytics as well! Just create your goal as normal, and then you'll need to create a couple custom segments. Click the (+Add Segment) button, go down to Advanced -> Conditions, click +Add Filter. Then, change "Ad Content" to be the Custom Dimension you connected with Optimizely, and use the drop-down to select the variation. You'll need to create one for each variation to pitch them head-to-head.

And yes, you can definitely integrate GA Classic, it's covered in our KB article here:

Re: Time on page goal

Good post, Rafael. I'm not sure but I think this question has been posed before and if it's not already submitted in the product ideas section of the forumn, you may want to add it there as well.


I'm quite certain that this would be a feature that a lot of non technical users of Optimizely would deploy if it was as easy as adding a goal or tracking a click.  


Also, thanks for posting your answer, Michaelwei.


We do this in GA as well. Next time though, I'd like to use the javascript solution that you mentioned to see if it makes reporting on this metric a bit easier.


side note: kudos to the Optimizely team working on results page. The changes over the last few months have made it easier for our team to better inform our clients or results and takeaways. Thank you!!   


Keith Lovgren