Problem with recognising Optimizely snippet through container tags?
I've implemented the Optimizely snippet for one of split-tests into the relevant page, and whilst I can see the snippet is present, Optimizely's diagnotic report says it can't find it.
We use a container tag solution called OpenTag, so the Optimizely snippet has been implemented inside the container present on the page.
I'm hesitant to start the test before the diagnostic tool recognises that the snippet is present, even though I can definitely see it's in there.
Does Optimizely have a problem seeing the snippet if it's implemented via a container tag solution? How can this issue be resolved so that I can confidently start the split-test?
All our tests have run perfectly though so am guessing it is just a bug in Optimizely.
Don't take the Diagnostic Report's word as the law. I'd advise you to consider it as a helpful nudge that reminds you to double-check the snippet is on the page, but so long as you can confirm that is the case, ignore any further error messages it shows.
Here are a few reasons why you might get an error message in the Diagnostic Report although the snippet is on the page:
1) The snippet has been modified and the Diagnostic Report can no longer recognise it in its new form. This looks like it might be the case for you.
2) The snippet is not defined natively on the page, but is instead installed via an external script or tag manager. If the snippet is not defined natively, the Diagnostic Report cannot find it.
3) Your page is being loaded via proxy. You can check this by opening up the browser console once the experiment has loaded in the editor and searching for an object called "loader". If you expand the object, you'll be able to see whether the page has loaded via HTTPS, HTTP or proxy. If the page is loaded over proxy, the editor inserts a temporary snippet and the Diagnostic Report returns an error.
In all three cases, you can safely ignore the error message since you already know the snippet is on the page.
In any case, I hope this sheds some light on how the Diagnostic Report works.