Rich-text Reply

Click Goal of moved element in Variation not being tracked

kenbrian 11-04-16

Click Goal of moved element in Variation not being tracked

[ Edited ]

I am not getting click data for elements that have been moved on the page for the variation. Those elements are being tracked correctly for the control, but not in the variation. Is this because they have been moved for the variation?

Thanks, Ken
@kenbrian
Level 2

Re: Click Goal of moved element in Variation not being tracked

Hi kenbrian,

 

When creating a click goal, Optimizely binds click events to the elements. It uses the best selector it can find to bind the click event to. If an element has an ID-selector, and when moving it this element retains that ID-selector, then Optimizely should keep binding the click event correctly.

 

If Optimizely can't find an ID-selector, it will have to use another selector that likely selects the element based on its location on the page. When you then move the element, its selector changes. Optimizely won't be able to track it anymore unless you let Optimizely know about the new selector.

 

Are you able to add the new selector for your variation to the click goal? Are you using Optimizely Classic or Optimizely X Web?

 

Best,
Nils

kenbrian 11-07-16
 

Re: Click Goal of moved element in Variation not being tracked

You are correct, there was no ID for Optimizely to get a hold of it was resorting to a child selector which was changed in the Variation. Once I found out how to view what element was getting tracked (in the advanced link of the goal) I was able to point it to a unique element that was true for both the control and the variation. Thank you!
Thanks, Ken
@kenbrian
Level 2

Re: Click Goal of moved element in Variation not being tracked

I'm glad you found the answer Ken Smiley Happy