Smart rich text pop-up to direct visitors to correct languageSOLVE
Oct 26, 2020 8:08 AM
I've tried looking for a way to direct website visitors to the correct language, but I can't find a solution. One would be to instantly direct visitors according to their IP, but that apparently requires some 3rd party. ( https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Location-redirection-based-on-IP-addre... )
The solution I'm looking for, as possibly the 'easy' solution, is using a rich text module, as these can have smart rules. BUT! The most appealing result would be that this module would display as a pop-up. --> If a visitor is in Finland and lands on our site (with english as primary language) a pop-up would show "Looks like you're in Finland -> click here to proceed to the finnish site", with also the option to close the window and continue navigating the english site. However, if the visitor is not currently in Finland, the entire pop-up wouldn't show.
Is either option possible?
Regarding pop-ups I found this: https://designers.hubspot.com/blog/how-to-implement-a-modal-on-your-cms-site-pages , but it requires the user to click open the pop-up.
Solved! Go to Solution.
Oct 27, 2020 2:17 PM
So, you would need a basic if statment in a script that runs on page load to check if that matches the current language on the site (probably easiest way to do that is to check the page's HTML lang attribute). If it does, you're good. If it doesn't, trigger the popup that has the language switcher in it.