Rich-text Reply

click goal

guyf 03-15-16

click goal


I have a question regarding 'click goals'.

currently i have several variants where each one replace a section in the page (like DIV) and replace it with <IMG>.


i want to have a click goal on this IMG, so i added an html tag of: <A href='something'><IMG><A> to all variations.


the problem is that i need to manually set on each variant the 'goal click' (because it's element which not exists on the page) and the result of the clicks are not correct.


how can i create a single 'goal click' which will test all of the different variations so i can see which variant got the higher clicks ?



Level 1

JDahlinANF 03-15-16

Re: click goal

You might have a few things askew in this scenario.

1- you do not need an <a> around your image to make it a click goal.  you could set the goal directly on the <img>


2- if your goal is not recording correctly, it means that it is either not matching the <img> you added or is matching more than just the <img> you want it to track.


Easiest solve... change your <img src-"something"> to be like the following and then set your click goal to look for whatever value you put in the "class" of your image:


<img class="Optimizely_widget_ABC" src="something">

With this, you would set your click goal to look for clicks on the inserted image.  Since this class is unique to you and only you, it will never match anything else and you have now have a standard you can follow for other experiments (though you should use a different class name for each type of thing the img does so that you can track each type of image separately):