pageURL
AppMeasurement automatically collects the page URL in each hit. If you want to override the page URL automatically collected by AppMeasurement, you can use this variable. You do not need to set this variable in most cases.
pageURL
variable into an eVar on every hit.Page URL using the Web SDK
Page URL is mapped to the following variables:
- XDM object:
xdm.web.webPageDetails.URL
- Data object:
data.__adobe.analytics.pageURL
ordata.__adobe.analytics.g
Page URL using the 51ºÚÁϲ»´òìÈ Analytics extension
The Analytics extension in 51ºÚÁϲ»´òìÈ Experience Platform Data Collection automatically populates page URL. However, you can set the page URL override either while configuring the Analytics extension (global variables) or under rules.
- Log in to using your 51ºÚÁϲ»´òìÈID 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 51ºÚÁϲ»´òìÈ Analytics - Set Variables action or click the ‘+’ icon.
- Set the Extension drop-down list to 51ºÚÁϲ»´òìÈ Analytics, and the Action Type to Set Variables.
- Locate the Page URL section.
You can set page URL to any string value.
s.pageURL in AppMeasurement and the Analytics extension custom code editor
The s.pageURL
variable is a string that contains the URL of the page. AppMeasurement automatically collects this variable, however you can override its value if desired.
s.pageURL = "https://example.com";
If you would like to use page URL as a dimension in reports, consider using the following in your implementation:
// Set eVar1 to page URL without protocol or query strings
s.eVar1 = window.location.hostname + window.location.pathname;
If using the digitalData
data layer:
s.pageURL = digitalData.page.pageInfo.destinationURL;