Select country on home page (or) overlay

Highlighted
New Contributor

So our site is not yet launched on the HubSpot COS (launching soon) but we have multiple country sites with different URLs... Ours (the US) is the .com and is completely independant of the other countries (.be and .co.jp) Right now the site is set up with a service that looks at country and sends them to the "correct site" based on IP address.

 

When we re-launch we want users to select the country when they type in the .com url and land on our homepage so they know they have been rerouted to a different site (similar to what IKEA.com does https://www.ikea.com/)... I'm not a developer so I'm just trying to figure out the best way to handle this...

 

I'm thinking that we would need to create 2 "homepages" the first being a landing page that allows for country selection, possibly using "smart content" to recommend a location but provide other options as links, and then have the US page be a url like "home-us" (or would we just put it into a sub folder like /us/home) so when select you have the US homepage... ). Or we could just list the 3 homepages and have the user select... Looking for recommendations on approach.

 

Since I'm not a developer I essentially would need to know how to frame the request to the development team, but I want to make sure we are developing a sustainable and strategic solution.

 

I have looked through all of the support questions here on the forums and I've not seen any other folks with similar issues and I may have answered my own question here but I would love some input.

Reply
0 Upvotes
2 Replies 2
Regular Contributor | Diamond Partner

If you want to develop it similar to how Ikea has it set it up:

  1. Create a splash page for the homepage (www.yourpage.com) and I think www.yourpage.com/us would be the most approriate url for the US homepage.
  2. Create a Hubspot form to use on the page that includes a dropdown of the available websites.
  3. Since you are wanting to redirect to a different page depending on the selection you would have to use the form embed code and so would be unable to use smart content here, but the developers could use HTML5 Geolocation and a location API like Google Maps or GeoNames to get the location of the user and preselect an option based on the closest country.
  4. Use the onFormSubmit function of the form embed code to place in javascript for grabbing the selected country on submit and redirecting to the approriate page.

    <!--[if lte IE 8]>
    <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
    <![endif]-->
    <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
    <script>
      hbspt.forms.create({
        portalId: "{{ PORTAL.ID }}",
        formId: "{{ FORM.ID }}",
        onFormSubmit: function($form) {
          // Your Code Here
        } 
      });
    </script>

Hope this helps!

Alyssa Wilie
Web Developer
LyntonWeb

Reply
0 Upvotes
New Contributor

Thank you Alyssa! I'm going to keep that as an option!

I ended up deciding to go with a service, geotargetly.com that seems to provide the functionality I need with many options for implementation. It produces a simple javascript that I can place in the hubspot pages (I was going to use GTM, but apparently that can provide a bit of a lag...) Once I get it up and running I'll post a link... I'm modifying my approach from what I was going to do originally, but I think it will be a sustainable implementation and slightly better form a UX perspective. 

Reply
0 Upvotes