Geolocation Country Redirect Popup

Elie_Nehme
New Member
7 0 0

We have two Shopify stores, a .com and a .ca. We want to be able to redirect visitors to their country based shop with a popup that asks whether or not they want to switch to the other website. We were able to implement the code, on our .ca (artifactskin.ca) website, found in this Shopify article:

https://docs.shopify.com/manual/configuration/store-customization/page-specific/store-wide/get-a-vis...

Everything works great, when a US visitor arrives on the site, they are asked whether or not they want to switch to the .com or they can just close the popup and proceed on the .ca. However, the popup keeps popping up as you click through the website. How can I make it so that when the popup is closed, it stays closed. Perhaps it pops up only on the homepage? or it doesn't popup again for one full day? 

Thanks, Elie

0 Likes
Jason
Shopify Expert
10175 135 1912

You'd need to build in a method to set a cookie that marks if the popup has been closed or not. You'd then check for that cookie on second page load and determine whether it should show again.

You might gleam some info on cookie usage from the Age Gate doc (does require some tech knowlege):
https://docs.shopify.com/manual/configuration/store-customization/controlling-access/add-age-verific...

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes
Elie_Nehme
New Member
7 0 0

Thanks Jason, I will give it a try.

0 Likes
Cesar
Shopify Expert
37 1 9

Elie,

 

If you want a quick and easy trick, you can also install a Shopify app to do the same. We have an app that do exactly what you need, letting the customer to choose whether they want to jump to the specific site. Check this out: https://apps.shopify.com/geo-ip-redirect-manager

 

Best regards,

Cesar

Find more about apps for your store.
★ Geo IP Redirect Manager: https://apps.shopify.com/geo-ip-redirect-manager
★ Connected Inventory: https://apps.shopify.com/connected-inventory
★ Theme Save: https://apps.shopify.com/theme-save
We're really good at consulting and customization: support@inscoder.com

0 Likes
SteveHelm
New Member
3 0 0

Hi

We have an app that could help you out. You can customize a bar/popup with the country choices within the app itself and when a customer makes a choice it will be remembered as well. The bar/popup will not show up again before a preset time period. Moreover, the time period is completely changeable as per your requirements from within the app. 

Check out our app: Cozy Country Redirect

Best regards

Steve

Steve Helm | Support Executive @ Cozy Addons
0 Likes