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.
Adobe data collection servers strip this dimension from all link tracking image requests. If you want this dimension to appear in link tracking hits, consider copying this dimension into an eVar.
Page name is mapped to the following variables:
xdm.web.webPageDetails.name
data.__adobe.analytics.pageName
You can set page name either while configuring the Analytics extension (global variables) or under rules.
You can set page name to any string value, including data elements.
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;