Article sections

    In some cases, depending on the structure of your website, when you create an A/B test and apply certain changes to a specific element, the changes won’t be visible in case you test the experiment live.

    If that is the case, then one solution is that to replace the selector created by our platform with the direct selector of the element you want to change.

    In order to do that, follow these steps:

    • Go to your website page and right-click – select ‘Inspect’: 
    website inspect
    • Click on the ‘Select icon’ and search for the element you want to change:
    inspect select element
    • At the bottom, you have the code of the selected element highlighted. Right-click on it and choose ‘Copy’ > ‘Copy selector’. This represents the direct selector of that specific element.
    inspect copy selector
    • Paste it into a Notepad file in order to easily have access to it:
    copy selector notepad
    • Access your A/B test, apply the desired change to that one specific element; after that, in the Variation drop-down, click on the ‘Code’ option:
    a b test variation code
    • Delete the selector of the element created by the platform as highlighted in the picture below and replace it with the direct selector of the element saved in the notepad:
    a b test variation code dev
    • After doing so, it should look like presented in the picture below [ without the red line highlighting it ? ]:
    a b test variation code final look
    • Click ‘Save’ on the Code window and then ‘Publish’ your experiment.
    a b test publish experiment

    Please keep in mind that for every change you make, you must wait 4 – 5 minutes until it will be visible – live – on your website. 

    Was this post helpful?