What's the best way to set-up a pop-up based on URL parameters?

Silver Contributor
Silver Contributor
I'd like to set-up a pop-up (that shows an offer) based on URL parameters. Basic visitor flow will be ... 1. Click on ad 2. Land on site with specific parameter indicating the Channel, Vendor, and Campaign 3. Pop-up shows Channel specific offer Preferably a sexy lightbox type pop-up :)
2 REPLIES 2

What's the best way to set-up a pop-up based on URL parameters?

Employee Emeritus
Hi Tomomi, There are two ways to do this. Note that the lightbox instructions vary between JavaScript libraries/plug-ins/extensions/custom JS but the popular ones are well-documented. 1. The easiest way is to use the content modification extension to do this. Set the conditions (i.e. what determines whether or not this pop-in, probably specific values for the 3 parameters you listed), modification rules (i.e. ID to target and positioning relative to this ID), and in the "Content" box you'd write the HTML you want to display. This box does not support JavaScript, HTML only. If you're looking to do a lightbox, whatever you choose to use would have to be able to listen for DOM element propagation since this extension inserts the new content at DOM ready. 2. You'd have to use the JavaScript code extension and code everything manually, setting conditional logic based on those query string parameters. While not as user friendly, this gives you more flexibility and will probably be easier to integrate with those JavaScript lightboxes. Hope this helps!

What's the best way to set-up a pop-up based on URL parameters?

Silver Contributor
Silver Contributor
Thanks Son, I'm at an intermediate level with JS, but I'd like to explore option 2 for my scenario: - the site is http://www.lensway.co.uk - we're using http://fancybox.net/ - there is already a pop-up that fires for new visitors based on a cookie - the JS trigger and HTML pop-up are located at the bottom of - goal is to trigger the light box based on GA parameters - seg=promofirstpair How would that be structured to ensure it's not disrupting the current set-up? Especially the HTML portion for the pop-up.
Public