Ask permission for location on page load?

Hi @AlexDaresTo did you find any solution? I am having a similar issue. I am using google maps to display static maps of various places. The request for permission to access the user’s location comes up, but I am not asking for the user’s geographic location nor do I need it for any functionality on the map or in my app.

Hi @leonidas.petrou4 and everybody
I’ve a similar issue 95 times out of 100 the user does not give consent to use their location immediately once they arrive on the site via the browser popup, cause they don’t know the site and they don’t trust it initially.

From real user test it appears that after not allowing the sharing of their location, the users take a look at the site, evaluate that it is reliable and then click on “find my location” which is a backup solution that try to locate the user via IP system and 100% of the times gives them a position far from where they are, at that point they leave the site because they do not consider it reliable.

What you’ve proposed, so prompt back the Allow permission after clicking a button, seems the best option.

Did someone know how to structure the workflow to do that?

Thank you!

So i was researching and there is no way for the browser popup to show again if you want to pronpt the user to allow locatiion. but you can detect when the location is empty or lat & lon is 0 and show a mini popup to instruct the user to allow location.

Usually they have to click the location icon in the url bar for desktops and select allow location for this site.
and mobile (at least android) you click the padlock icon inn the url bar and select permissions and click the on button for location.

1 Like

Hi Akiempaul, you’re totally right, it seems impossible.
In the end what we did is to postpone the request for the position,
giving the user the opportunity to take a look at the app before.
when he will decide he can click on a button and share his position.

Thank you!

Hi Ozario, I’m looking to postone the request for the position, as you did. Unfortunately, I didn’t get how you did it. Could you explain your flow ?

Basically, I’m trying to let the user discover my application without prompting any localisation request, and wait for him to sign up to show a button “share my location” that prompt the navigator localisation request. Could you help me to “avoid the request to happen earlier” and to make the “button trigger the localisation request” please ?

Your trick would be really helpful !

2 Likes

Hi Moreillon, being honest I’m not a tech/dev guy so I paid a developer to do that, a long time passed, and totally I don’t know how he did, cause I didn’t find a solution here on the forum.

I’m sorry unfortunately I can’t help you.

Still looking for a way to prompt the « ask permission for location. Does anyone found a way to do prompt the permission question only after the user clicked on a « share my position » button ?

It would help me a lot :slight_smile: