Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • mohd iliyaj 8 posts 77 karma points
    Nov 07, 2023 @ 05:12
    mohd iliyaj
    0

    Depending on location changing the content of website

    Hello Everyone,

    I have developed the umbraco basic website with only one "home.cshtml" file. Now I want to add some features like below mentioned.

    Add country specific website where some sections will be hidden -
    1. For example, if I am browsing from India, I will see login login
    2. When I browse from US, I will see simple sign up button (instead of login button)

    Can anyone help me to solve this. Please provide the information like in steps not in paragraph and mention file if it is possible.

    Thank you,
    Iliyaj

  • Søren Kottal 702 posts 4497 karma points MVP 5x c-trib
    Nov 07, 2023 @ 07:34
    Søren Kottal
    0

    Using a geolocation API like https://ip-api.com/, you can pass in the users IP address and get the location. Though its not completely accurate, it's probably your best bet. You can get the users IP adress from the Request object, like Request.UserHostAddress - read more here

    You can also use the browsers geolocation API, but that would depend on the user having a GPS in their device, AND allowing access to it - the browser will prompt the user when you try to get it the first time. This can be annoying for the user.

  • [email protected] 406 posts 2135 karma points MVP 7x c-trib
    Nov 12, 2023 @ 15:23
    jeffrey@umarketingsuite.com
    0

    Hi Iliyaj,

    another alternative could be the uMarketingSuite. What you want to achieve is a sort of explicit personalisation. Based on an IP-address serve different functionality and/or content. The uMarketingSuite does this and is fully integrated in Umbraco.

    Check the functionality out on their website https://www.umarketingsuite.com/features/personalization/

    Have a great day,

    Jeffrey

Please Sign in or register to post replies

Write your reply to:

Draft