- Optimizely Web Experimentation
- Optimizely Performance Edge
Before you start an experiment, you want to preview it to make sure that it is working as intended. Check your site’s existing functionality, and new elements you added, and navigate to the events tab to make sure that your goals are firing correctly.
Load pages
Understanding how pages load in the editor may help you determine exactly why your pages are not loading in the editor the way you expect them to.
Optimizely Web Experimentation and Optimizely Performance Edge try to load pages over HTTP and HTTPS, with a timeout of 15 seconds for the page to register a “hello” message. If that timeout occurs, the pages are loaded over proxy.
Optimizely Web Experimentation and Optimizely Performance Edge then pre-loads up to four pages in the editor.
Handle changes and reloading pages
In Optimizely Web Experimentation, whenever you make changes in the editor, Optimizely Web Experimentation uses a clone of the DOM <body>
element for the initial page load, and then resets the <body>
each time, applying your new change immediately afterwards. This method has one drawback: the global JavaScript context cannot be reset without reloading the entire page. When this happens, custom code changes are applied over and over again in the same global context, which can cause unexpected behavior.
Optimizely Performance Edge keeps track of the changes you made in a change list. What happens next depends on the type of change you just made:
- If it is a visual change:
- The changes are added to or updated in the change list.
- The change list is sent down to the iFrame.
- The previous change list is undone, and the new change list is applied in its place. This is possible because Optimizely Performance Edge stores the necessary information to undo all visual changes it applies.
- If it is a custom code change:
- Optimizely Performance Edge reloads the entire page and applies all your changes in order. This is required because you cannot “undo” a code change.
Changes execute in the order they appear in the sidebar, and each change waits for the one immediately preceding it to complete before it executes. Changes cannot be re-ordered.
The editor workflow
As described above, when you open a page in the editor, it attempts to load three protocols (HTTP, HTTPS, and proxy) at the same time. If the protocol requested by the user (either HTTP or HTTPS) does not load, Optimizely Web Experimentation and Optimizely Performance Edge use the proxy load as its fallback option. The production client then begins loading JavaScript files:
- The first JavaScript file to load—
innie.js
—identifies the version of the editor being used. - The production client loads the
p13n_inner.js
JavaScript file. This is the file that contains the core logic required to manipulate and interact with the pages on your site.
The p13n_inner.js
file fetches the editor client from the app's backend (the production client is too lean to run in the editor). The editor client then requests the editor data for the specific project you're working in, and is then initialized.
app.optimizely.com/js/innie.js
app.optimizely.com/dist/js/p13n_inner.js
Troubleshoot page issues
If everything looks good, then start running your experiment. If not, check this article to help diagnose the issue. There are a few common reasons you can troubleshoot:
- Your page is not loading in the Editor – See Pages not loading in the editor.
- Your page is loading slowly, or your original page "flashes" briefly before the variation appears – You may notice this when you try to view your experiment live on your site. This often has to do with the timing of Optimizely Web Experimentation's execution on the page. See Fix flashing or flickering variation content.
- You do not see any changes on the page – You notice this when you preview the experiment. More often you will set your experiment live and visit a page you expect to modify, but find that your changes are not appearing. See Experiment not activating or Variation content does not display.
- The page is not displaying as you intended – You notice this when you preview the experiment. This could be an issue with variation content. See Variation content does not display. It could be an issue with the way the browser is rendering Optimizely's changes. See Visual Editor in Optimizely Web Experimentation and Optimizely Performance Edge for how to make more precise changes in the Editor.
- A goal/event is not tracking correctly – You may notice this when you preview, but you might also catch it as results are coming in. See Metrics do not track correctly.
- You do not see conversions for a certain variation on the Results page – See Variation content does not display.
- You do not see ANY visitors or conversions on the Results page – See Experiment not activating.
- You see a warning that starts with We have loaded your site using compatibility mode – you may be encountering an issue with mixed content. See Compatibility mode warning and mixed content in the Editor then reload the page.
- Loading pages require session-specific information or logging in (like a shopping cart, intranet page, or password-protected content) – see Cannot load a password-protected, gated, or session-specific page in the Editor.
- Load content that is in an iframe – see Cannot edit iframes in the Editor.
- Use an X-Frame-Options header – see Update your site's Content Security Policies (CSP).
Please sign in to leave a comment.