Audience mode

mceclip1.png

Default Audience mode is set in website settings. The choice here depends on how your website is built and the most important thing here is what happens when you navigate on the website.

If your entire website reloads on each navigation then you can leave this option on On load. This means that Audience will be (re-)evaluated each time the website reloads (when the visitor enters the website and also when he/she navigates on the website.

However, if your website fetches new content dynamically (without reloading the entire website) upon navigation then you need to use one of the other two modes (On load & URL change or Manual activation). Read more about these two below.

 

Static website (default)

On load (default):

Executes when the page loads. This is the default and works great as long as you are not running a Single Page Application.

 

Dynamic website 

In order to run your A/B test or personalization successfully on dynamic pages built with frameworks like React, Angular, Vue, etc, you need to turn on our Single page application alternatives in the audience. If you are implementing your dynamic website for the first time, please read our guide on Implementation for Single Page Applications (SPA)

On load & URL change:

This is our automatic way of handling Single Page Applications. This might work well if your URL changes when the visitor navigates.

Please make sure to open up a preview for your project and check that your changes work on navigation between pages where Audience should be true and pages where Audience should be false, and vice versa. If this doesn't work well, please use Manual mode (see below).

Manual activation:

The ”On load & URL change” might work but often it takes a while after the URL has changed until the new content is loaded. Then it might be better to make a callback to let the Symplify script when new content is loaded and Audience should be (re-)evaluated. This is done by calling symplify.newPage(); when content is changed on the site.

The callback should be fired when changes happen that you would call a page view. It is really important that this is timed well with content change. It should not be called to soon (when the old content has not been removed yet), as that would make Audience evaluate on old content. And it should not be called to late (when the new content has been visible a while) as that could cause "flickering" (i. e. you would see the original version of the page some milli seconds before the variation changes are applied).

 

 

Was this article helpful?
0 out of 0 found this helpful