htmlgoogle-analyticsgoogle-tag-managergoogle-optimize

Optimize - variant changes on specific elements not showing in preview mode


I'm trying to test changes to our website, which is a dynamic application. When making edits to certain elements, the visual editor gives a warning:

"The number of elements selected changed after the page was initially loaded. Make sure that your changes appear as expected using preview mode." I've read all the official Google documentation on this specific warning. See the layout here

I've enabled activation events, set it to optimize.activate and made sure it is being pushed to dataLayer.

When I preview in debug mode, it says the experience was applied, the activation event was triggered on 'optimize.activate' and the url matches. Yet only one of the changes have been applied. See here

When I open the console and call dataLayer, optimize.activate is right there.

I'm honestly baffled. I read here that filters on the Analytics view linked to your Optimize container can stop events 'showing up'. We use filters to IP block our staff from showing up in our Analytics data.

Any help on this would be amazing.

p.s. I'm not a developer so go easy on me :)


Solution

  • Ok this maybe for a couple of reasons... I've had a few instances where I can view changes in preview mode:

    1. First of all, if you're viewing changes in incognito mode, you need to make sure the following option is switched off in your browser - Block third-party cookies. If this is switched on, then in preview mode, your browser will block the Optimize 360 cookie and your experiment will not run. (This means you will not see your changes).

    2. Secondly, if you have Audience Targeting set, these features do not work or show in preview mode.

    3. Thirdly, your test may not be firing on the correct event trigger. EG pageload. So make sure the correct event is attached to your AB Test. As you will be able to see the changes in edit mode, but again not in preview mode.

    Your issue is likely to be point 1 or 3.