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 getPageName
-
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 getPageName function uses the following arguments:
si(optional, string): An ID inserted into the beginning of the string representing the ID of the site. This value can either be a numeric ID or a friendly name. When not set, it defaults to the current domain.qv(optional, string): A comma-delimited list of query string parameters that, if found in the URL, are added to the stringhv(optional, string): A comma-delimited list of parameters found in the URL hash that, if found in the URL, are added to the stringde(optional, string): The delimiter to split up individual parts of the string. Defaults to a pipe (|).
The function returns a string containing a friendly-formatted version of the URL. This string is typically assigned to the pageName variable, but can be used in other variables as well.
Examples
Upgrading from Previous Versions
Version 4.0+ of the getPageName plug-in is not dependent on the existence of the Adobe Analytics’ AppMeasurement object (i.e. the s object). If you upgrade to this version, change the code that calls the plug-in by removing any instances of the s object from the call. For example, change s.getPageName(); to getPageName();.
Version History
4.2 (March 19, 2021)
- Added version number as context data.
4.1 (September 17, 2019)
- Changed default delimiter value to a pipe character (from a colon + space).
4.0 (May 22, 2018)
- Complete reanalysis/rewrite of plug-in
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.