Is there any way to detect the country of the visitor and redirect it to appropriate pages and cultu

veronica madsen asked on May 9, 2015 20:43

hi,

I am using kentico on my local machine under trial version of 14 days. I created the pages for different cultures Arabic ,chinese and by default US English. Now I want every page to detect where the visitor is coming from and redirect to the appropriate page. i realize that detecting country by browser setting is not the most accurate but its better than nothing.

thnx

veronica

Recent Answers


Virgil Carroll answered on May 10, 2015 01:07

What version of Kentico are you looking at? Ultimate or EMS? If Ultimate then you will probably have to do something custom coded using browser configurations.

If you are using EMS, you could look at the new Personas component and look at building it against that.

0 votesVote for this answer Mark as a Correct answer

Charles Matvchuk answered on May 10, 2015 02:17 (last edited on December 10, 2019 02:30)

@Veronica, you can use macro's. Currently the way I do it, is to use the AnalyticsContext in Macro's. With respect to what Virgil indicated, I am not sure if you can still use this context below Ultimate.

{% AnalyticsContext.CurrentGeoLocation.State |(identity)GlobalAdministrator%}

The above will give me the state of the visitor, or you can get country, city, etc. etc. Remember it is using the current IP address to resolve so if their IP address is showing a different location it won't be exact. There are many more properties under the CurrentGeoLocation that you can use I recommend just trying it out. Then you could use a Logic Macro and resolve, then a redirect link.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.