Developer
User guidesDeveloper websiteHelp centerLog in
  • Welcome!
  • Organisations structure
    • Datamart
    • Users and roles
  • User points
    • User identifiers
      • Networks IDs
        • Device-based Network IDs
          • Custom Device ID integration
          • ID5
          • First ID
        • User-based Network IDs
          • Custom User ID integration
          • UTIQ martechpass
      • Accounts
      • Emails
      • Device identifiers
    • User activities and events
    • Compartments
    • User profiles
    • User segments
    • Hyper point & Quarantine
  • Data model
    • Defining your schema
    • Computed fields
      • Concepts
      • Setup
      • Development
      • Examples
  • Data ingestion
    • Real time user tracking
      • Website tracking
      • Mobile apps tracking
      • Ads exposure tracking
      • AMP tracking
      • Conversions tracking
      • Email views and clicks
      • Tracking API
      • Event rules
      • Activity analyzers
    • Bulk processing
      • Imports
        • User activities import
        • User profiles import
        • User choices import
        • Segments import
      • Deletions
        • User identifiers deletion
        • Device points deletion
        • User points deletion
      • User identifiers association
      • Integration batch
    • Activities analytics
    • Data warehouse
      • Preliminary setup
        • BigQuery
      • Create data warehouse
  • Querying your data
    • OTQL queries
    • OTQL examples
    • GraphQL queries
    • UserPoint API
    • User activities
    • Activities analytics queries
      • API Quickstart
      • Dimensions and metrics
      • Use cases
    • Funnel API
  • Alerting
    • Alert configurations
  • Data visualisation
    • Quickstart
    • Dashboards
    • Sections and cards
    • Charts
    • Datasets and data sources
      • Using a data file data source
    • Transformations
    • Filters
    • Cookbook
    • Reference
  • Advanced usages
    • Audience segmentation
      • Audience features
      • Segment builders
      • Audience segment metrics
      • Audience segment feed
        • Building new feeds
        • Monitoring a feed
        • Curated Audiences (SDA)
      • Edge segments
      • Cohort-based Lookalike
    • Contextual targeting
      • Setup
      • Activation
        • Google Ad Manager
        • Xandr (through prebid.js)
      • API documentation
    • Exporting your data
      • Query Exports
      • Datamart replication
    • Data privacy compliance
      • User choices
      • Cleaning rules
      • Exercise of user rights
      • Cookies
    • Campaigns
    • Automations
      • Email routers
      • Email renderers
      • Opt-in provider
      • Custom action plugins
      • Usage limits for automations
    • Plugins
      • Concepts
      • Creation & Deployment
      • Coding your plugin
      • Manage existing plugins
      • Layouts
      • Presets
      • Monitoring
      • Throttling
      • Batching (for external feeds)
    • Platform monitoring
      • Resources usage
        • Dimensions and metrics
      • Collection volumes
        • Dimensions and metrics
      • Events ingestion monitoring
        • Dimensions and metrics
    • Data Clean Room
      • Bunker
      • Clean room
  • Resources
    • Tutorial: Data Ingestion
      • Your first events
        • Add the mediarithmics tag
          • Getting the tag
          • Adding the tag
        • Send events using the tag
          • Adding event properties
          • Finding the UserEvent type in your schema
          • Matching your schema
          • Standard events
      • Your first bulk imports
        • API basics
          • Authentication
          • Your first API call
        • Send documents using the API
          • Requirements
          • Sending documents
    • Using our API
      • Authentication
    • Tools & libraries
      • mics CLI
      • JS Tag
      • Plugin SDK
    • Data cubes
      • Creating a report
      • Reference
Powered by GitBook
On this page
  • Associated user events
  • Display Ad Pixel
  • Ad Click tracking URL
  • Campaign tracking on Google
  • Display Video 360
  • Campaign Manager 360 integration
  • Ad Manager integration
  • Campaign tracking on Xandr
  • Campaign tracking on The Trade Desk
  • Video Ad Tracking
  • Passing user identifiers in pixel-based tracking
  • User Account
  • User Email
  • User Agent

Was this helpful?

Export as PDF
  1. Data ingestion
  2. Real time user tracking

Ads exposure tracking

PreviousMobile apps trackingNextAMP tracking

Last updated 1 month ago

Was this helpful?

You can track the exposition of users to the different kind of Ads format that exist today:

  • Display Ads: All Ads that are either static image/animations or HTML5 animated Ads

  • Video Ads: All Video Ads that the User can see through a marketing campaign

All Ads tracking is done using Pixels and Click Tracking URLs.

You should consider using this feature to get ad view and ad click directly within your datamart when using DSPs .

Activities tracked through this method will be of DISPLAY_AD $type and NO_SESSION $session_status. See for more information.

Associated user events

There are two predefined that should be tracked during the exposition of a user to an Ad :

Event name
Tracking method
Description

$ad_view

Pixel

The 'view/impression' of the Display Ad to the User

$ad_click

Click Tracking URL

The 'click' of the Ad by the User

Display Ad Pixel

Use the following URL in your tracking pixel to send an $ad_view event to the platform.

https://events.mediarithmics.com/v1/touches/pixel? \
	$ev=$ad_view& \
	$dat_token=<DATAMART_TOKEN>&
	$catn=<CAMPAIGN_TECHNICAL_NAME>&
	$scatn=<AD_GROUP_TECHNICAL_NAME>&
	$crtn=<CREATIVE_TECHNICAL_NAME>&
	$cb=<CACHEBUSTER>&
	gdpr=<GDPR>&
	gdpr_consent=<GDPR_CONSENT_184>
	... any custom property
Field
Type
Description

$ev

String

The event name. $ad_view for Display Ad impression tracking

$dat_token

String

The token (not the ID) of the datamart in the mediarithmics platform.

$catn

String

Campaign technical name

$scatn

String

Sub-campaign technical name

$crtn

String

Creative technical name

$cb

String

The cache buster parameter. It should contain a random string. optional

$cuid

String

$uaid

String

$email_hash

String

$comp_token

String

Compartment token (not the ID)

$uids

JSON as string (Optional)

gdpr

Number

TCF v2.2 parameter to indicate if gdpr applies or not (values: 1 or 0)

gdpr_consent

String

TCF v2.2 parameter containing the encoded consent string

any custom property name

Any Type

Any custom property. optional

Ad Click tracking URL

Use the following click-tracking URL to send an $ad_click event to the platform.

https://events.mediarithmics.com/v1/touches/click?
	$ev=$ad_click&
	$dat_token=<DATAMART_TOKEN>&
	$catn=<CAMPAIGN_TECHNICAL_NAME>&
	$scatn=<AD_GROUP_TECHNICAL_NAME>&
	$crtn=<CREATIVE_TECHNICAL_NAME>&
	$cb=<CACHEBUSTER>&
	$redirect=<CLICK_URL>&
	gdpr=<GDPR>&
	gdpr_consent=<GDPR_CONSENT_184>
	... any custom property
Field
Type
Description

$ev

String

The event name. $ad_click for Display Ad click tracking

$dat_token

String

The id of the audience datamart in the mediarithmics platform.

$redirect

String

The redirect url. This string should be URL Encoded. (RFC 3986)

$catn

String

Campaign technical name

$scatn

String

Sub-campaign technical name

$crtn

String

Creative technical name

$cb

String

The cache buster parameter. It should contain a random string. optional

$cuid

String

$email_hash

String

$comp_token

String

Compartment token (not the ID)

$uids

JSON as string (Optional)

gdpr

Number

TCF v2.2 parameter to indicate if gdpr applies or not (values: 1 or 0)

gdpr_consent

String

TCF v2.2 parameter containing the encoded consent string

any custom property name

Any Type

Any custom property. optional

If you want to integrate with an external DSP / Ad Server such as Google Ad Manager or App Nexus, you can use the ids of the creative ad groups and campaign from your external DSP as technical names. See the integrations below for examples.

Campaign tracking on Google

Display Video 360

You can use the following macros as a minimum configuration for tracking on DV 360 (ex-Doubleclick Bid Manager):

https://events.mediarithmics.com/v1/touches/pixel?
	$ev=$ad_view&
	$dat_token=<DATAMART_TOKEN>&
	$catn=${CAMPAIGN_ID}&
	$scatn=${INSERTION_ORDER_ID}&
	$crtn=${CREATIVE_ID}&
	gdpr=${GDPR}&
	gdpr_consent=${GDPR_CONSENT_184}&
	$cb=${CACHEBUSTER}
https://events.mediarithmics.com/v1/touches/click?
	$ev=$ad_click&
	$dat_token=<DATAMART_TOKEN>&
	$catn=${CAMPAIGN_ID}&
	$scatn=${INSERTION_ORDER_ID}&
	$crtn=${CREATIVE_ID}&
	gdpr=${GDPR}&
	gdpr_consent=${GDPR_CONSENT_184}&
	$cb=${CACHEBUSTER}&
	$redirect=${CLICK_URL_ENC}

Campaign Manager 360 integration

You can use the following macros as a minimum configuration for tracking on Campaign Manager 360 (ex-Doubleclick Campaign Manager):

https://events.mediarithmics.com/v1/touches/pixel?
	$ev=$ad_view&
	$dat_token=<DATAMART_TOKEN>&
	$catn=%ebuy!&
	$scatn=%eaid!&
	$crtn=%ecid!&
	gdpr=${GDPR}&
	gdpr_consent=${GDPR_CONSENT_184}&
	$cb=%n
https://events.mediarithmics.com/v1/touches/click?
	$ev=$ad_click&
	$dat_token=<DATAMART_TOKEN>&
	$catn=%ebuy!&
	$scatn=%eaid!&
	$crtn=%ecid!&
	gdpr=${GDPR}&
	gdpr_consent=${GDPR_CONSENT_184}&
	$cb=%n&
	$redirect=<CLICK_URL>

Ad Manager integration

You can use the following macros as a minimum configuration for tracking on Ad Manager:

https://events.mediarithmics.com/v1/touches/pixel?
	$ev=$ad_view&
	$dat_token=<DATAMART_TOKEN>&
	$catn=%ebuy!&
	$scatn=%eaid!&
	$crtn=%ecid!&
	gdpr=${GDPR}&
	gdpr_consent=${GDPR_CONSENT_184}&
	$cb=%%CACHEBUSTER%%
https://events.mediarithmics.com/v1/touches/click?
	$ev=$ad_click&
	$dat_token=<DATAMART_TOKEN>&
	$catn=%ebuy!&
	$scatn=%eaid!&
	$crtn=%ecid!&
	gdpr=${GDPR}&
	gdpr_consent=${GDPR_CONSENT_184}&
	$cb=%%CACHEBUSTER%%&
	$redirect=<CLICK_URL>

Campaign tracking on Xandr

You can use the following macros as a minimum configuration for tracking on Xandr:

https://events.mediarithmics.com/v1/touches/pixel?
	$ev=$ad_view&
	$dat_token=<DATAMART_TOKEN>&
	$catn=${CP_CODE}&
	$scatn=${CPG_CODE}&
	$crtn=${CREATIVE_CODE}&
	gdpr=${GDPR}&
	gdpr_consent=${GDPR_CONSENT_184}&
	$cb=${CACHEBUSTER}
https://events.mediarithmics.com/v1/touches/click?
	$ev=$ad_click&
	$dat_token=<DATAMART_TOKEN>&
  	$catn=${CP_CODE}&
	$scatn=${CPG_CODE}&
	$crtn=${CREATIVE_CODE}&
	$cb=${CACHEBUSTER}&
	gdpr=${GDPR}&
	gdpr_consent=${GDPR_CONSENT_184}&
	$redirect=${CLICK_URL_ENC}

Campaign tracking on The Trade Desk

You can use the following macros as a minimum configuration for tracking on The Trade Desk:

https://events.mediarithmics.com/v1/touches/pixel?
	$ev=$ad_view&
	$dat_token=<DATAMART_TOKEN>&
	$catn=%%TTD_CAMPAIGNID%%&
	$scatn=%%TTD_ADGROUPID%%&
	$crtn=%%TTD_CREATIVEID%%&
	$cb=%%TTD_CACHEBUSTER%%&
	gdpr=${GDPR}&
	gdpr_consent=${GDPR_CONSENT_184}
https://events.mediarithmics.com/v1/touches/click?
	$ev=$ad_click&
	$dat_token=<DATAMART_TOKEN>&
  	$catn=%%TTD_CAMPAIGNID%%&
	$scatn=%%TTD_ADGROUPID%%&
	$crtn=%%TTD_CREATIVEID%%&
	$cb=%%TTD_CACHEBUSTER%%&
	gdpr=${GDPR}&
	gdpr_consent=${GDPR_CONSENT_184}&
	$redirect=%%TTD_CLK_ESC%%

You can track additional properties by using custom properties such as:

...
domain=%%TTD_SITE%%&
device=%%TTD_DEVICETYPE%%&
...

Video Ad Tracking

Basic video ad tracking can be achieved by integrating the display ad pixel (with $ad_view events) and the click-tracking URL (with $ad_click events) into your video ad format.

For more advanced capabilities, a specific integration can be setup based on the visit pixel (with custom completion events) and an Activity Analyzer. Please advise with your Account Representatives during the design phase.

Passing user identifiers in pixel-based tracking

The following is true for all types of pixel-based tracking (events, ads, email, conversions, ...) which use the events.mediarithmics.com/v1/touches/pixel API endpoint

You can pass one or more user identifiers when using the $uids field.

https://events.mediarithmics.com/v1/touches/pixel? \
	$ev=$ad_view& \
	$dat_token=<DATAMART_TOKEN>&
	$catn=<CAMPAIGN_TECHNICAL_NAME>&
	$scatn=<AD_GROUP_TECHNICAL_NAME>&
	$crtn=<CREATIVE_TECHNICAL_NAME>&
	gdpr=<GDPR>&
	gdpr_consent=<GDPR_CONSENT>&
	$cb=<CACHEBUSTER>&
	$uids=jso-[{"$tpe":"AG","$agid":"vec:1234"}]&
	... any custom property

jso- prefix means that the rest of the string will be interpreted as a json object.

Don't forget to correctly encode the URL

User Account

Field
Type
Description

$tpe

Constant String

AC

$ctok

String

The token of the compartment

$acid

String

The user account id of the user

User Email

Field
Type
Description

$tpe

Constant String

EM

$eh

String

The email hash

$e

String (Optional)

The "raw" email

User Agent

Field
Type
Description

$tpe

Constant String

AG

$agid

String

Use the registry token, not the id, when formatting the user agent id.

Eg: dev:<registry_token>:<value>

User account of the user

Mobile identifier of the user to identify the

Email Hash of the user

The list of of the user.

Please note that before declaring a custom property, we recommend that you inform our PS team so that it can be indexed to your data schema (and therefore used for segmentation and/or dataviz), see our .

User account ID of the user

Email Hash of the user

The list of of the user.

More info on DV360 macros available here:

More info on Google Campaign Manager 360 macros can be found here:

And for TCF integration:

More info on Google Ad Manager macros can be found here:

More info on Xandr supported macros can be found here:

More info on The Trade Desk supported macros can be found here (a The Trade Desk account is requiered to access this page):

Please note that before declaring a custom property, we recommend that you inform our PS team so that it can be indexed to your data schema (and therefore used for segmentation and/or dataviz), see our .

The

User activity object
user events
data model documentation
https://support.google.com/displayvideo/answer/2789508
https://support.google.com/campaignmanager/table/6096962
https://support.google.com/campaignmanager/answer/10031693?hl=en
https://support.google.com/admanager/answer/2376981
https://learn.microsoft.com/fr-fr/xandr/monetize/supported-creative-macros
https://desk.thetradedesk.com/knowledge-portal/en/faq-macros.html
data model documentation
identifier
User agent
identifier
user identifiers
identifier
identifier
user identifiers
user agent id