pageName
The pageName
variable typically stores the name of a given page. It is helpful to determine what individual pages are most popular. This variable populates the Page dimension.
If this variable is not defined on a given page tracking call, the pageURL
variable is used instead.
Page Name using the Web SDK
Page is mapped for Adobe Analytics under the XDM field web.webPageDetails.name
.
Page Name using the Adobe Analytics extension
You can set page name either while configuring the Analytics extension (global variables) or under rules.
- Log in to Adobe Experience Platform Data Collection using your AdobeID credentials.
- Click the desired tag property.
- Go to the Rules tab, then click the desired rule (or create a rule).
- Under Actions, click an existing Adobe Analytics - Set Variables action or click the ‘+’ icon.
- Set the Extension drop-down list to Adobe Analytics, and the Action Type to Set Variables.
- Locate the Page name section.
You can set page name to any string value, including data elements.
s.pageName in AppMeasurement and the Analytics extension custom code editor
The s.pageName
variable is a string that typically contains the name of the page. It has a maximum value of 100 bytes; longer values are truncated. This truncation includes instances where it falls back to pageURL
if this variable is blank.
// Set page name to a static value
s.pageName = "Example page name";
// Set page name to the page's title
s.pageName = window.document.title;
If using the digitalData
data layer:
s.pageName = digitalData.page.pageInfo.pageName;