Skip to main content

Optimising popup content sitewide

If we have a number of popups applicable across all the site pages, but certain ones that only trigger on, say number of page views, is there a way to only show the popup content in the generated page html once the trigger has activated. Otherwise we could potentially have 10-15 popup elements loading on every page all the time until the trigger takes effect.

An example would be if we have a popup to push a customer to buy a specific product from a category, if he has visited that category page, but then carries on navigating around the site. We would target the popup to show on any page, but only after the customer has visited a specific product page and also visited 10 or more pages. Ideally we wouldnt want the content to appear within every page as it would dilute the content of a page for SEO if we had,say, 20 products that we wanted to push to customers.

One of the other popup systems out there, as an example, uses javascript to generate the popup content once all the rules are completed, thereby only adding in the content when the popup is triggered.

Daniel Iser

Sorry its late David Brown dav

Unfortunately generating the content on demand only works in some scenarios. If your using any other plugins content in our popups, you can bet that won't work. For example a Gravity Form in our popup requires all kinds of extra processing/scripts/styles that need to be on the page for the form to work, and all of those are written by the GF team assuming the form is available when the page loads.

Because we have such deep integration with other plugins, some things simply aren't feasible unless all those also supported it, and they have no real incentive to add ajax form loading.

Simpler content you could try to use Remote Content possibly to load the contents only when the popup opens, but depends on the content again,

There are solutions, but all involve tweaking the way you think about setting it up, for example maybe one popup for all those upsells, instead of one each, and have it show dynamic content based on factor X (pages viewed).