Use case: Free Service offering, if users click on a premium feature we want to pop a HubSpot landing page as an iframe with a CTA if interested in upgrading.
Since they are already logged into our service before they click on anything, I’d like to automatically populate/pass their email address ideally so there is no form fields to complete.
If they click on the CTA above it will display “Thanks, someone will contact you shortly.”
Then I’ll proceed with internal notification and other workflow actions.
So, how can we inject the user’s email address into the iframe/CTA button?
I would highly recommend against using iframes. It’s a bad experience for the user to start along with other tracking issues that could arise. If you already have a dev team who manages this platform for your organization, you could just ask them to place a button anywhere on your app/service and then let them post through the Hubspot API directly to your form. The user is already captured within the system and the repost to Hubspot could be done cleanly without taking the user out of the flow of what they are doing in your system. https://legacydocs.hubspot.com/docs/methods/forms/submit_form
The bolded ITEMs above are where you’d put in the unique user information. If you have a user ID, that could be one way to create a nice clean link. The query parameters “email” and “name” can be interchanged, added, removed, etc. It’s a choose your own adventure style where you can makeup whatever you want. You can also add these custom parameters to Google Analytics for data tracking.
You cannot use query parameters with HubSpot CTAs. CTAs are intended to be unique to particular offers, not unique to particular users. So that is something to weigh in while looking at options.
Another option if you don’t want to use a button - You could create a form with all hidden fields for the contact properties you want… so the user would only see the “submit” button but on your end you’d see all the fields.