CMS Development

joshuatree
Member

Query strings on landing pages

Hello! Our Rails engineering team has been tasked with integrating some search results functionality into a Hubspot landing page.

 

We are skilled with Rails, but relatively new to Hubspot. We have questions about how to accomplish a few things from the Hubspot side.

Quick overview of our project:

- Build a landing page on Hubspot that our marketing team can use for lead generation, split-testing, etc.

- The landing page will, below the headline and marketing copy, need to call an iframe. This iframe will pull and display search results from our Rails application.

- When the landing page calls that iframe from our server, we need to include the query string from the URL of the Hubspot landing page itself.

Two questions:

1. How do we retrieve the query string in the landing page URL so we can pass it through to the iframe’s source URL?

2. In general, can we include custom html and javasript on landing pages?

Any guidance would be much appreciated!

0 Upvotes
1 Reply 1
Ntbrown
Contributor

Query strings on landing pages

1. https://developers.hubspot.com/docs/cms/hubl/variables Same as any other templating language <-- vars exposed. request.query, request.query_params in your case depending on what you want.

If you want to see what all you have to work with... it's more illuminating to just make a dummy website page and open it. You should see a "sprocket" icon in the upper right hand side of the page at which point you can click on it to view the "developer info" to see the vars and how things are represented at a lower level.

2. You can. Same as any other CMS. No issues here.
0 Upvotes