Page Segment Tracking
What is a page segment?
A page segment is the name given to a value that you (as a publisher) assign to divide ad revenue by customized buckets. This is generally used to measure the impact of layout changes in an A/B type test.
Why would you want to use page segments?
You may have two or more different versions of the same page and want to compare how they perform. This could be for one (or more) of the following reasons:
- Layout related (comparing performance of an ad above the fold vs below the fold)
- Ad placement related (four ads vs five ads per page)
- UX design feature (such as background color)
- Refresh strategy testing
In all of these cases, it's important to note that you do the actual implementation of the test. We recommend that you set up your own way of persisting the test segment over the session.
How do you set a page segment?
Use one of the following two options:
Add a URL parameter
Add the following query parameter to the end of a page's URL to automatically set the page segment: ssrt_ps=[value]
Set the page segment as an element in the deployads array, using a script like the following:
NOTE: Do this before the head script is included. Otherwise it will have no effect and the page segment will not be tracked.
How are page segments tracked?
Page segments are tracked at the session level using session storage in the browser. Page segment data includes the metrics for the page-view when the segment was set and all subsequent page-views in the session.
How do you report on page segments?
In the Report Builder, use the Performance Report or Ad Revenue Report to track your page segments (as one of the dimensions).
The page segment is set in the session storage key-value pair ssrt_utm_[site id]. To check if it is set, examine the session storage in the ‘Application’ tab of dev tools (Chrome Inspector).
The first time our head script runs, it initially checks if we have defined the segment in session storage. Then it checks the pageSegment variable and URL for a segment value. If it finds one, it sets the storage key. It will not check again for the rest of the pageview.