Counting unique visitors/goals on a search-specific object question
On our site we have a suggestions box div for when users submit certain queries into our site-wide search box, but this box does not show up for all queries. All users go to www.example.com/search/[queryparameters], but only on certain paramters does this box get loaded.
We are trying to test visual changes to this div, tracking clicks within the div as our only goal, using a substring match for /search/ in URL Targeting.
Will Optimizely count a unique visitor and track the goal even when this div is not loaded? All of our changes have been made to a specific div, so it's unclear whether Opitimizely will count/track when this div simply isn't there (i.e. there is nothing on the page to change).
We do not want to count a visitor and track where they're clicking when this box is not on the page. Only when a user submits a query that loads the div should they be counted and their potential clicks within it tracked.
Not sure how Optimizely defaultly handles this and if there's some kind of API solution.
Solved! Go to Solution.
Good question. The answer depends on your targeting settings. If you are targeting a substring match to www.example.com/search/ then the experiment will run on every page that has this string in the URL. This also means a visitor will be counted every time he/she lands on a page that meets the targeting conditions (regardless of whether the suggestions box appears)
If you want to only run the experiment on the suggestions box, then I recommend using manual activation API call to start the experiment *only* when this box actually appears. You can find details about manual activation here: https://help.optimizely.com/hc/en-us/articles/200040225-Activation-Mode-Activating-an-experiment-dyn...
By manually activating only when the suggestion box appears, you will ensure your visitor count/conversions reflect the # of people who actually saw the box & converted with a click
Does this sound like it will do the trick for you?