Install the plug-in manually implementing the Web SDK
This plug-in is not yet supported for use within a manual implementation of the Web SDK.
Install the plug-in using the Adobe Analytics extension
Adobe offers an extension that allows you to use most commonly-used plug-ins with Adobe Analytics.
-
Log in to Adobe Experience Platform Data Collection using your AdobeID credentials.
-
Click the desired tag property.
-
Go to the Extensions tab, then click on the Catalog button
-
Install and publish the Common Analytics Plugins extension
-
If you haven’t already, create a rule labeled “Initialize Plug-ins” with the following configuration:
- Condition: None
- Event: Core – Library Loaded (Page Top)
-
Add an action to the above rule with the following configuration:
- Extension: Common Analytics Plugins
- Action Type: Initialize getGeoCoordinates
-
Save and publish the changes to the rule.
Install the plug-in using custom code editor
If you do not want to use the Common Analytics Plugins plug-in extension, you can use the custom code editor.
- Log in to Adobe Experience Platform Data Collection using your AdobeID credentials.
- Click on the desired property.
- Go to the Extensions tab, then click the Configure button under the Adobe Analytics extension.
- Expand the Configure tracking using custom code accordion, which reveals the Open Editor button.
- Open the custom code editor and paste the plug-in code provided below into the edit window.
- Save and publish the changes to the Analytics extension.
Install the plug-in using AppMeasurement
Copy and paste the following code anywhere in the AppMeasurement file after the Analytics tracking object is instantiated (using s_gi). Preserving comments and version numbers of the code in your implementation helps Adobe with troubleshooting any potential issues.
Use the plug-in
The getGeoCoordinates function does not use any arguments. It returns one of the following values:
"geo coordinates not available": For devices that do not have geo-location data available at the time that the plug-in runs. This value is common on the first hit of the visit, especially when visitors first need to provide consent on tracking their location."error retrieving geo coordinates": When the plug-in encounters any errors when attempting to retrieve the device’s location"latitude=[LATITUDE] | longtitude=[LONGITUDE]": Where [LATITUDE]/[LONGITUDE] are the latitude and longitude, respectively
"40.438635333" is rounded to "40.4386" to limit the number of unique values to be captured. The values are close enough to pinpoint the device’s exact location within around 20 feet.This plug-in uses a cookie named "s_ggc" to store coordinates between hits if necessary.
Examples
Version History
2.0 (March 19, 2021)
- Added version number as context data.
1.0 (May 25, 2015)
- Initial release.
More help on this topic
Was this content helpful?
Announcements
Get hands-on with agentic AI.
Explore how AI agents work together through real examples and hands-on practice. Join your local User Group to design an agent workflow with your peers and leave with a practical framework you can apply to your own work.
Find an eventAdobe CX Analytics Portfolio Roadmap Webinar - Americas & EMEA
Preview the CX Analytics roadmap across CJA, Adobe Analytics, and more. Ask the team.
Adobe CX Analytics Portfolio Roadmap Webinar - Americas & APAC
Preview the CX Analytics roadmap across CJA, Adobe Analytics, and more. Ask the team.