Search
K

Google Analytics

Learn how to implement Google Analytics tracking in your Display

Overview

Google Analytics tracking is configurable on a license-level: the same Google Analytics Tracking ID will be applied to all your Display instances in the same license, once configured.

Events

All events are tracked to the iPaper Display category in the following format:
gtag('event', [EVENT NAME], {
event_category: 'iPaper Display',
event_action: [ACTION],
event_label: [LABEL],
non_interaction: [IS NON INTERACTIVE]
});
Note:
Google Analytics 4 (GA4) does not by default collect event categories, so event names in GA4 have ‘ipd_’ prepended for iPaper Display events
Note:
When using Google Analytics 4 (GA4), the contents of event_label are also sent as individual event parameters prepended with ‘ip_’

Overview

Note:
Dependent on whether you are using Universal Analytics (UA) or Google Analytics 4 (GA4) the event names will be slightly different
UA event name
GA4 event name
Interactive
Data
Comments
Instance
Load
ipd_load
No
{
Url: [DISPLAY_URL]
}
Time Spent
ipd_time_spent
No
{
Duration: [DURATION_IN_SECONDS]
}
Button entity
Button Click
ipd_button_click
Yes
{
ActionUrl: [BUTTON_ENTITY_ACTION_URL]
}
Image entity
Image Click
ipd_image_click
Yes
{
ActionUrl: [IMAGE_ENTITY_ACTION_URL],
AssetUrl: [IMAGE_ENTITY_ASSET_URL]
}
Product entity
Product Click
ipd_product_click
Yes
{
Id: [PRODUCT_ENTITY_PRODUCT_ID],
ActionUrl: [PRODUCT_ENTITY_PRODUCT_URL]
}
Instance
Video Click
ipd_video_click
Yes
{
ActionUrl: [VIDEO_ENTITY_ACTION_URL],
AssetUrl: [VIDEO_ENTITY_ASSET_URL]
}
Only available for autoplaying video. ActionUrl is only present if the entity has an action assigned to it.
Video Start
ipd_video_start
Yes
{
ActionUrl: [VIDEO_ENTITY_ACTION_URL],
AssetUrl: [VIDEO_ENTITY_ASSET_URL]
}
Only available for non-autoplaying video. Fires once per video entity, when a user manually plays video. ActionUrl is only present if the entity has an action assigned to it.
Video Played 25 Percent
ipd_video_played_25_percent
Yes
{
ActionUrl: [VIDEO_ENTITY_ACTION_URL],
AssetUrl: [VIDEO_ENTITY_ASSET_URL]
}
Only available for non-autoplaying video. Fires once per video entity, once the timestamp of a video exceeds the stated percentage of its total duration. ActionUrl is only present if the entity has an action assigned to it.
Video Played 50 Percent
ipd_video_played_50_percent
Yes
{
ActionUrl: [VIDEO_ENTITY_ACTION_URL],
AssetUrl: [VIDEO_ENTITY_ASSET_URL]
}
Only available for non-autoplaying video. Fires once per video entity, once the timestamp of a video exceeds the stated percentage of its total duration. ActionUrl is only present if the entity has an action assigned to it.
Video Played 75 Percent
ipd_video_played_75_percent
Yes
{
ActionUrl: [VIDEO_ENTITY_ACTION_URL],
AssetUrl: [VIDEO_ENTITY_ASSET_URL]
}
Only available for non-autoplaying video. Fires once per video entity, once the timestamp of a video exceeds the stated percentage of its total duration. ActionUrl is only present if the entity has an action assigned to it.
Video Played 100 Percent
ipd_video_played_100_percent
Yes
{
ActionUrl: [VIDEO_ENTITY_ACTION_URL],
AssetUrl: [VIDEO_ENTITY_ASSET_URL]
}
Only available for non-autoplaying video. Fires once per video entity, once the timestamp of a video exceeds the stated percentage of its total duration. ActionUrl is only present if the entity has an action assigned to it.

Example

For example, when somebody clicks on a button in your Display, we will track it as such via the “Button Click” event:
Universal Analytics (UA):
gtag('event', 'Button Click', {
event_category: 'iPaper Display',
event_action: 'Button Click',
event_label: 'Url: https://wwww.ipaper.io/',
non_interaction: true
});
Google Analytics 4 (GA4):
gtag('event', 'ipd_button_click', {
event_category: 'iPaper Display',
event_action: 'Button Click',
event_label: 'Url: https://wwww.ipaper.io/',
non_interaction: true,
ip_url: 'https://wwww.ipaper.io/'
});

Interactive flag

There are some events that we want to mark as non-interactive (or “non-interaction events” by Google Analytics’ definition). This will mean that even if these events are fired, the session will be considered as bounced if the user does not further interact with the page.

Event labels

The data format below is represented in JSON. It is converted to a string for the eventLabel object using the following convention:
  • Key names are PascalCased
  • Key-value pairs are separated by the pipe character |
Example:
{
Id: [PRODUCT_ENTITY_PRODUCT_ID],
Url: [PRODUCT_ENTITY_PRODUCT_URL]
}
…is converted into:
Id: [PRODUCT_ENTITY_PRODUCT_ID] | Url: [PRODUCT_ENTITY_PRODUCT_URL]