Pulling Localized User Agreement Pages To Show Users In-App


Have pinged Customer Support with this issue and was directed here.

We're trying to display localized (per country) User Agreements to users who download our app (we're in 15+ countries around the world).

An example of our proposal is as follows:
1.) Our Mobile App opens www.webpage.com/user-agreement?country=fr
2.) HubSpot pulls the France localization of that page

Want to know if this proposal is doable from HubSpot, and if so, what information we need to send HubSpot via our app so that the correct page is displayed.

Bonus would be if HubSpot can support a lang parameter as well.

Any help would be much appreciated. Thanks, and happy holidays!


Welcome, @John_Wachunas. Happy holidays to you as well!

What was the support ticket number? I'd like to see what you've covered already.

If the following isn't outlined in the ticket, could you clarify exactly how you want your app to pull a page into the app. You describe the app "opening" a URL; is the app actually directing the user to their mobile browser and opening the page, or are you pulling the page's contents into your app through something like an iframe?

If you've already created translations of pages, you should be able to leverage the hslang query parameter to navigate to or retrieve the correct page variation.


Hi @Isaac_Takushi, and thank you for the quick response. We didn't get very far at all in Support, but the ticket number was #2174653. Conferring quickly with our ENG team and will answer your questions shortly.


Hi @Isaac_Takushi I am a colleague of @John_Wachunas .

To answer your question, the mobile app "opening" a URL means that it will open the mobile phone's browser and load the webpage hosted at that URL. In other words:

  1. User opens mobile app
  2. Mobile app opens www.webpage.com/user-agreement?country=fr in the browser
  3. DESIRED BEHAVIOR: HubSpot loads the localization for country France

On another note, what does the query parameter "hslang" do? We don't want to conflate country and language. There are several countries that have more than one official language, such as Canada and Belgium. We want to load content appropriate for the user's country, not for their language.


Thanks for clarifying, @lime_will!

HubSpot's out-of-the-box solution for country localizations is the smart content Country filter. You can set modules to display different content based on the IP country of the visitor.

With this approach, you wouldn't have to send query parameters, but IP country values aren't foolproof either. As I'm sure you know, someone on a VPN could appear as browsing from a different country than what you have on file.

I understand your concern about conflating language and country. I brought that up in response to @John_Wachunas bringing up a lang parameter. The hslang parameter allows you to leverage translations of HubSpot pages, which is a bit more robust a solution than smart content, however it relates more to language than country.

As a quick comparison:

  • Smart content was developed before page translations.
  • Smart content is used to modify the content within modules on a single page.
  • In contrast, page translations are truly different pages with language-specific slugs.
  • You must translate the content on translated pages yourself — HubSpot has no auto-translate feature at this time.
  • Translated pages support smart content themselves, so, if you wanted, you could have different translated pages based on the visitor's preferred language and a layer within each translation for the IP country.

Beyond these built-in HubSpot options, you would need to implement a custom JavaScript solution to hide or display certain content based on the query string you pass.


Hi @Isaac_Takushi thanks so much for the detailed response.

I still don't know what the right solution for our problem is. IP lookup won't work for us. We need to display the display the appropriate country content for our users, but the desired country doesn't always match the country generated by IP lookup.

Perhaps we can generalize the problem as follows:

  1. We want to display content for the user. The user has property "bar".
  2. We are able to pass query param and value to HubSpot as follows: "?foo=bar"
  3. Can HubSpot display content for an arbitrary param called "foo", with value equaling "bar"?

What solution do you recommend for us?


Fair enough about IP lookup, @lime_will.

As I said, HubSpot has no out-of-the-box solutions which support custom query parameters, but you can certainly accomplish this with JavaScript on a HubSpot page.

Here's a great little guide I found.


Thanks so much for your assistance, @Isaac_Takushi! Will and I are meeting in about an hour to discuss, and will ping this thread shortly thereafter if we have further questions.