Using query parameters to generate dynamic images on unbounce page


#1

hi, we’re looking to use unbounce for some landing pages, and need the page to render some dynamic data. we hope to do it as follows:

  1. pass in a query param: http://unbouncepages.com/mysite?person_id=1234

  2. have a javascript on the page that consumes the query param

  3. the script makes an ajax call to our service that returns person data like full name and image url

  4. dynamically generate html with the script to render an image and a header tag for ‘person_id’

is this within scope of the feature set?


#2

Hi Doug - Unbounce lets you add any client side scripts (including javascript, jQuery, AJAX, etc–more on that here) to your landing pages, so that should be no problem. The app also won’t alter any incoming URL parameters, so if your script(s) reference one of those parameters, it should work just as intended.

You can also render dynamic HTML with scripts, so you can use a custom HTML element to add your image tag and then use the script to adjust that after page load. Ditto with the header tag–you can add a placeholder tag to your page and then use .js to rewrite the value.


#3

awesome, thank you so much – this will work with all plan levels (starter, pro99, pro199)?


#4

Hi Doug - happy to help out! Embedding custom HTML and adding scripts is available across all plans. The only features that you’ll need a Pro plan for are our Infusionsoft, Salesforce, and Hubspot integrations and Dynamic Text Replacement.

Any other feature is shared across all plans.


#5

Hey Doug - this is something I’m trying to do as well, but not sure what the script needs to look like. Did you succeed? Can you share any pointers?
Thanks!


#6

Hi Quinn - would it be possible to actually just set the bg image within a URL tag, similar to how one would use dynamic text?  That would work better for me because I could just have all the hosted images loaded as a merge tags for the emails I’m sending out and then pass the variable through the URL.