How to remove the geolocation store from the AEM Client Context

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.

  1. 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.

  2. In the Network panel, search for stores.init.js.

  3. 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.

  4. Double click that stores.init.js URL to visit it.

  5. Search for "geolocation" in the code:

    CQ_Analytics.GeolocationUtils.init("geolocation");

  6. 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:

  1. Go to /sites.html on author.

  2. Browse to the root of your site where the Client Context has been configured.

  3. Open the page for editing.

  4. Switch to Design Mode.

  5. At the top of the page, click the Edit button where it says Design of clientcontext.

  6. This helps you confirm which Client Context the site is pointing to under /etc/clientcontext.

  7. Go to /miscadmin and in the left hand tree, browse to the referenced Client Context under Client Context Configurations.

  8. Double-click it to open for editing (for example, now you should be on a page like this /etc/clientcontext/default/content.html).

  9. 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).

  10. Activate the Client Context page to the publish instances (via the sidekick).

  11. 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

  12. If this line disappears from the js file, then you removed it successfully:

    CQ_Analytics.GeolocationUtils.init("geolocation");

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online