General principlesSection titled General principles
Custom page events are additional information on the session that can be used to segment sessions. Similar to dynamic vars, custom page events can be sent at any time during a session.
Custom pages events are used when we want to segment based on a specific visitor (
For instance, VoC events triggered (3 stars only, smiley face emoji…), specific messages and validation errors and even things like if page took more than x seconds to load, visitor’s status, such as “is the user logged in?”,option selected in drop-down menu. And many more…, up to your imagination.
Furthermore, it can also be used as a trigger for Event Triggered Replay (ETR) where the full user session or specific pageview is collected.
LimitsSection titled Limits
- It is possible to save up to 40 page events per pageview. If more are received, only the first 40 will be kept.
- The maximum size is 255 characters.
Google Tag Manager (Template)Section titled Google Tag Manager (Template)
Open your container and go to the templates section.
Select Search Gallery.
contentsquareand select the Contentsquare - Page Events option.
Click Add to workspace.
Confirm your choice by selecting Add
Go to the Tags section and click the New button to create a new tag.
Configure it by selecting the top-right button.
contentsquareand select the Contentsquare - Page Events template that you’ve previously added to your container.
Give a title to the tag and input your Tag ID in the dedicated field.
Enter the event name.
(Optional) If needed, add additional page events.
Select the trigger:
DOM Ready(when data layer has been fully loaded).
Save your changes and go back to your container. You should now see both the template and the newly created tag.
Adobe LaunchSection titled Adobe Launch
Within Tag properties, select Rules > Add Rule.
Specify a name, events, and conditions.
Add an Action with the following settings:
- Action Type:
Contentsquare - Page Event.
On the right-hand side, enter the event name.
Select Keep Changes > Save.
Custom HTMLSection titled Custom HTML
Defining page EventSection titled Defining page Event
To define a page Event which will be automatically sent right away, use the
For example, here’s how to collect a user identifier to filter Session Replays, with the
Verifying the sending of page eventsSection titled Verifying the sending of page events
Our Contentsquare Tracking Setup Assistant Chrome Extension displays each page event sent.
Inspecting the payloadSection titled Inspecting the payload
If you can’t use our Chrome extension, use the
From the browser console, run this command to create the cookie:
Reload the page.
In the Network tab, search for
pageEvent, select the request, and check the value of the
Checking the requestsSection titled Checking the requests
To check the actual request that is sent for transactions, follow GET requests will sent to
//c.contentsquare.net/pageEvent, with these parameters.
|Parameters you can have an influence on:|
|Page Event (compressed)||String|
|Parameters determined by the technical environment of the configuration|
|A random digit to avoid request caching||Integer|
|Unique user ID||String|
|Page number (each pageview increments of 1)||Integer|
|identifies the page Event has ETR or not||Boolean|
|Tracking tag version||String|