Previous Page
The page URL, path, title, or canonical page identifier viewed immediately before the current page within the same session. This dimension categorises navigation flow by identifying the prior step in a user's on-site journey and is commonly used to analyse pathing, entry-to-content progression, internal click behaviour, and page-to-page drop-off.
Business Use Case
A content team analyses article pages by Previous Page to identify which homepage modules, category pages, or related-article links most often drive readers into high-engagement content. A CRO team uses it to see which page users came from before reaching checkout and where abandonment is introduced.
Business Criticality
High
Journey / Navigation Area
Digital Analytics
Scope
Event
Formula
For each page_view event within a session ordered by event timestamp: Previous Page = LAG(current_page_identifier) OVER (PARTITION BY user/session ORDER BY event_timestamp). If the current page_view is the first page in the session, set value to '(entrance)' or null based on reporting standard.Calculation Notes
1️⃣ Prefer internal previous page values from ordered page_view events over browser referrer. 2️⃣ Exclude unnecessary query strings to reduce cardinality unless required for analysis. 3️⃣ For SPAs, trigger virtual page views on route changes to reflect in-app navigation. 4️⃣ Define a consistent entrance value (e.g., '(entrance)') for first pageviews in a session. 5️⃣ Note that GA4 page_referrer may indicate browser referrer, not strictly prior internal page.
Technical Details
Events
| Platform | Event |
|---|---|
| Google Analytics 4 | page_referrer |
| Adobe | prop5 or any available prop |
Data Mappings
W3 Data Layer
{
"event": "page_view",
"page": {
"pageName": "Product Detail",
"pageURL": "https://www.example.com/products/widget-a",
"previousPage": "https://www.example.com/category/widgets",
"previousPageName": "Category: Widgets"
},
"web": {
"webPageDetails": {
"URL": "https://www.example.com/products/widget-a",
"name": "Product Detail",
"previousPageURL": "https://www.example.com/category/widgets",
"previousPageName": "Category: Widgets"
}
}
}GA4 Data Layer
{
"event": "page_view",
"page_location": "https://www.example.com/products/widget-a",
"page_title": "Product Detail",
"page_referrer": "https://www.example.com/category/widgets",
"previous_page": "https://www.example.com/category/widgets",
"previous_page_name": "Category: Widgets"
}Adobe Client Data Layer
{
"event": "page-view",
"page": {
"pageInfo": {
"pageName": "Product Detail",
"pageURL": "https://www.example.com/products/widget-a",
"referrer": "https://www.example.com/category/widgets",
"previousPage": "https://www.example.com/category/widgets",
"previousPageName": "Category: Widgets"
}
}
}XDM Mapping
{
"eventType": "web.webpagedetails.pageViews",
"web": {
"webPageDetails": {
"URL": "https://www.example.com/products/widget-a",
"name": "Product Detail",
"URLReferer": "https://www.example.com/category/widgets"
}
},
"_experience": {
"analytics": {
"customDimensions": {
"props": {
"prop5": "https://www.example.com/category/widgets"
},
"eVars": {
"eVar5": "Category: Widgets"
}
}
}
},
"_custom": {
"web": {
"previousPageURL": "https://www.example.com/category/widgets",
"previousPageName": "Category: Widgets"
}
}
}SQL Queries
Google Analytics 4 (BigQuery)
WITH pageviews AS (SELECT user_pseudo_id, user_id, CONCAT(user_pseudo_id, '-', CAST(ga_session_id AS STRING)) AS session_id, event_timestamp, (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_location') AS current_page, (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_title') AS current_page_title, (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_referrer') AS page_referrer FROM `project.dataset.events_*` WHERE event_name = 'page_view') SELECT user_pseudo_id, user_id, session_id, event_timestamp, current_page, current_page_title, COALESCE(LAG(current_page) OVER (PARTITION BY session_id ORDER BY event_timestamp), page_referrer, '(entrance)') AS previous_page FROM pageviews;Adobe Experience Platform (AEP Query Service)
WITH pageviews AS (SELECT identityMap.ECID[0].id AS mcid, eventTimestamp AS event_timestamp, _experience.analytics.customDimensions.eVars.eVar1 AS current_page, _experience.analytics.customDimensions.eVars.eVar2 AS current_page_title, _experience.analytics.customDimensions.eVars.eVar3 AS page_referrer FROM my_aep_dataset WHERE eventType = 'web.pageView') SELECT mcid, event_timestamp, current_page, current_page_title, COALESCE(LAG(current_page) OVER (PARTITION BY mcid ORDER BY event_timestamp), page_referrer, '(entrance)') AS previous_page FROM pageviews;Source Data
Digital Analytics, Business Intelligence
Dependencies
Prerequisite: List the dependencies required for this Dimension
Events:
Report Attributes
Dimensions: Previous Page, Current Page, Landing Page, Page Path, Page Title, Session Source/Medium Metrics: Page Views, Entrances, Exits, Bounce Rate/Engaged Sessions, Conversions, Revenue KPIs: Checkout Progression, Content Flow Efficiency
Segment Eligibility
True
Governance
Derived Dimensions
Governance
GitHub
catalog/dimensions/previous-page.yml