Load your site in a browser with the Developer Tools > Network panel open. In Google Chrome, select the Chrome menu at the top-right of your browser window, then select Tools > Developer Tools. Select the Network tab.
To disable, the geolocation client context store in AEM so that users are no longer prompted to share their physical location.
Steps
When users load AEM site for the first time, they are prompted whether to share their physical location.
I. Confirm that the Client Context is causing it
Before disabling geolocation in the Client Context, we should first make sure that the Client Context is being used and has geolocation enabled.
-
-
In the Network panel, search for stores.init.js.
-
If your search yields a result like the one below then your site has the AEM Client Context enabled:
/etc/clientcontext/default/content/jcr:content/stores.init.js?path=%2Fcontent%2Fgeometrixx%2Fen&_=1511221424870.
-
Double click that stores.init.js URL to visit it.
-
Search for "geolocation" in the code:
CQ_Analytics.GeolocationUtils.init("geolocation");
-
If you find that code, then the geolocation store is being used by the AEM Client Context.
II. Disable the Geolocation Store
To disable, do the following on the author instance:
-
Go to /sites.html on author.
-
Browse to the root of your site where the Client Context has been configured.
-
Open the page for editing.
-
Switch to Design Mode.
-
At the top of the page, click the Edit button where it says Design of clientcontext.
-
This helps you confirm which Client Context the site is pointing to under /etc/clientcontext.
-
Go to /miscadmin and in the left hand tree, browse to the referenced Client Context under Client Context Configurations.
-
Double-click it to open for editing (for example, now you should be on a page like this /etc/clientcontext/default/content.html).
-
Go to the edit mode on the client context editor page, remove the geolocation store item in the Client Context box (remove the component that has a map showing latitude and longitude).
-
Activate the Client Context page to the publish instances (via the sidekick).
-
Confirm whether the issue is resolved by going to this URL: http://www.txdot.gov/etc/clientcontext/default/content/jcr:content/stores.init.js?path=%2Fcontent%2Ftxdot%2Fen&_=1511221948185
-
If this line disappears from the js file, then you removed it successfully:
CQ_Analytics.GeolocationUtils.init("geolocation");