Implement the callback

By default Audience is evaluated on page load. This, however, does not work on a dynamic website where content is changed dynamically (without reloading the page). 

For audience to work correctly on a dynamic website you need to tell Symplify when to (re-)evaluate audience. This is done by calling sitegainer.newPage(); both on first load and then everytime content is changed on the site.

if(typeof sitegainer !== 'undefined') {
	sitegainer.newPage();
} else {
  document.addEventListener("sitegainer-loaded", function(e) {
  	sitegainer.newPage();
  });
}

 

This callback needs to be implemented in your back-end code. To cover "content change" the callback should be placed at the same spot you probably added the event push for Google Analytics that tracks Page Visits.

 

When this is implemented you need to change to the correct audience mode in your project

 

 

 

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