This client-side connexion allows you to synchronize a targeting list with Equativ’s Monetization Platform (EMP) and therefore run your media campaigns on this targeting list.
To synchronize your targeting lists with Equativ, you will need to :
Setup on your website (sas object must be available)
Have an active account on EMP
You'll need to provide your Equativ's credentials to your mediarithmics Account manager and especially the following :
Client ID
Client secret
Check User guides documentation to learn more about this feature.
URLs & hits must be captured into mediarithmics in order to perform the contextual extraction and semantic analysis. This can be done either through:
(user tracking)
(no user tracking)
(for mobile app only. url field needs to be populated in that case)
To configure the Contextual targeting feature, follow the setup steps below depending on your needs:
- MANDATORY. This initial configuration is required for all customers using the Contextual targeting feature
- OPTIONAL. Complete this step only if you plan to activate your contextual targeting lists. You do not need this step if your goal is solely to use contextual extraction for audience building within the platform
To configure Contextual targeting feature (contextual extraction & semantic analysis), please follow the next steps IN ORDER:
Schema update
Setup prebid.js on your website
Have an active account on Xandr Monetize solution
You'll need to provide your Xandr's credentials to your mediarithmics Account manager and especially the following :
Username
Passsword
Contextual targeting only works as of now with standard schema. Please reach out to your Account manager if you do not have UserEvent type in your schema.
For Panel-based as well as Semantic contextual targeting, you'll need to update your runtime schema to add the following line in UserEvent type:
$url attribute needs to be populated with a proper URL in order to extract the contextual_key (URL without protocol nor query stings).
As well, ensure that the field ts in UserEvent is indexed:
For Semantic contextual targeting, and particularly if you want to create Audience segments based on semantic information, you'll need to add the following lines in UserEvent type:
As well as the following types:
Don't forget to add @EdgeAvailability on semantic_tagging & targeting_list_ids properties if you want to use those characteristics for building Edge segments. More information about Edge segments.
You need to add Contextual Targeting Extractor event rule to channels on which you want to use the contextual targeting feature. This event rule will have various objectives:
Specify which JavaScript tag will be responsible for URL & hit collection:
User event tag: uses the URL explicitly passed in the event
Contextual targeting tag: automatically captures the page URL from the browser
Calculate and add the contextual key in the event. This is done automatically when adding the event rule
Add the semantic information extracted from a URL in the event . This is required if you want to create Audience segments based on semantic information. Check Tag event with semantic extract in that case
Specify URLs (Blacklist URLs) or group of URLs (Blacklist RegEx) to blacklist. No semantic extraction nor targeting will be perfomed on those URLs. If we take the example of a news website, we recommend blacklisting pages that list articles, usually related to the same theme (e.g. "politics") and that are frequently refreshed.
Add a URL to blacklist per line. ALL URLs provided should NOT have protocol in it (http://, https://). For example:
Add a regexp to blacklist per line. Note that only * is authorized and * will automatically be applied before and after the input regexp. For example:
Will blacklist the following URLs:
www.mediarithmics.io/homepage
mediarithmicsTEST.io/homepage
mediarithmics*io/homepage/page.
contextual_key:String @TreeIndex(index:"USER_INDEX")ts:Timestamp! @TreeIndex(index:"USER_INDEX")semantic_tagging:[SemanticTagging] @Property(path:"$properties.$semantic_tagging")
targeting_list_ids:[String] @TreeIndex(index:"USER_INDEX") @ReferenceTable(type:"CORE_OBJECT", model_type:"CONTEXTUAL_TARGETING_LISTS") @Property(path:"$properties.$targeting_list_ids")type SemanticTagging {
provider_id:String @Property(path:"$provider_id") @TreeIndex(index:"USER_INDEX")
provider_version:String @Property(path:"$provider_version") @TreeIndex(index:"USER_INDEX")
entities:[SemanticEntity] @Property(path:"$entities")
iab_categories:[SemanticIABCategory] @Property(path:"$iab_categories")
}
type SemanticEntity {
entity_id:String @Property(path:"$entity_id") @TreeIndex(index:"USER_INDEX")
name:String @Property(path:"$name") @TreeIndex(index:"USER_INDEX")
type:String @Property(path:"$type")
wikidata_id:String @Property(path:"$wikidata_id")
}
type SemanticIABCategory {
category_id:String @TreeIndex(index:"USER_INDEX") @Property(path:"$category_id")
name:String @TreeIndex(index:"USER_INDEX") @Property(path:"$name")
}www.mediarithmics.io/homepage
actu.mediarithmics.io/
mediarithmics.io/actumediarithmics*.io/homepageTo configure Targeting lists activation, please follow the next steps:
Contextual snippet installation (for website activation)
Targeting list / URL API implementation (for mobile app activation)
Activation plaftorm specific setup (for website & mobile app activation)
For website activation, you need to deploy a new mediarithmics snippet dedicated to Contextual targeting feature on every page where you want contexutal targeting activation to be performed. The mediarithmics Contextual targeting snippet is made of two parts:
The configuration that you should fill according to your context (site token & snippet name)
A technical part which contains the JavaScript code which asynchronously load the Contextual targeting tag on the page. This part should not be edited.
Here is an example of the Contextual targeting snippet you should implement:
You can find the site token, for each channel created, in Settings > Datamart > Channel.
As mentioned earlier, the Contextual targeting tag loaded through the snippet can also capture new URLs and associated hits.
In case of a Single-page application, you will need to execute the following function whenever the URL change and, more exactly, on every page where you want contexutal targeting to be performed:
This call wil result in extracting the current URL to lookup associated Targeting lists and synchronize their IDs with configured activation platforms. Please make sure to call this function as soon as possible to ensure that the Targeting lists IDs are calculated before the auction is executed.
Contextual targeting tag will automatically:
Identifies the URL browsed by an anonymous user
Determines which targeting lists are associated to the URL
Proceeds to key/value targeting with the configured activation platforms
For mobile app content to be eligible for activation, it must be linked to a URL that can be analyzed.
To enable mobile app activation, follow the steps below:
Integrate our dedicated API to within your mobile app.
Review the to learn more about how to autenticate when making API calls
In the API response, you will receive an array of targeting_list IDs (id property in targeting_lists object). These IDs must be passed to the activation platform in the next step.
To enable activation on external platforms, follow the setup guide corresponding to each platform:
The snippet should be inserted in the <head> part of the web page. The code of the Contextual targeting snippet is non-blocking - it does not impact on the page rendering time.
Send the retrieved targeting_list IDs to the activation platform you are working with. Refer to the activation platform’s documentation for instructions on how to transmit these IDs.
<script type="text/javascript">
/* YOU CAN EDIT THIS PART */
const siteToken = "<SITE_TOKEN>" // token to change
const snippetName = "ctMics" // snippet name that can be changed
/* YOU SHOULD NOT EDIT THIS PART */
!function(e,t,s,i){"use strict";var a=e.ctscimhtiraidem||{};var r="call".split(" ");a._queue=a._queue||{},a._names=a._names||[],a._names.push(s),a._queue[s]=a._queue[s]||[],a._startTime=(new Date).getTime(),a._snippetVersion="ct-1.0";for(var n=0;n<r.length;n++)!function(e){var t=a[s]||{};(a[s]=t)[e]||(t[e]=function(){a._queue[s].push({method:e,args:Array.prototype.slice.apply(arguments)})})}(r[n]);e.ctscimhtiraidem=a,e[s]=a[s];e=t.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src",`https://events.mics-notrack.com/v1/sites/${i}/contextual_targeting.js`),e.setAttribute("async","true"),t.getElementsByTagName("script")[0].parentNode.appendChild(e)}(window,document,snippetName,siteToken);
</script>
ctMics.forceSetTargeting() // replace "ctMics" by the snippetName you used when implementing the contextual snippetThis client-side connexion allows you to synchronize a targeting list with Google Ad Manager (GAM) and therefore run your media campaigns on this targeting list.
Please note that Google Ad Manager requires user consent for contextual targeting.
To synchronize your targeting lists with Google, you will need to :
Setup on your website
Have an active account on Google Ad Manager
You'll need to follow the following steps:
Configure your Ad Manager network (Admin > Global settings > General settings > Api access > Enabled)
Add mediarithmics Contextual targeting service account user for API access (Admin > Global settings > Network settings > Add a service account user) and specify KeyValue Management role.
POST https://api.mediarithmics.com/v1/communities/:communityId/contextual/semantic_extraction
GET https://api.mediarithmics.com/v1/organisations/:organisationId/contextual/targeting_lists
GET https://api.mediarithmics.com/v1/organisations/:organisationId/contextual/targeting_lists/:targetingListId
GET https://api.mediarithmics.com/v1/organisations/:organisationId/contextual/queries/:queryId
GET https://api.mediarithmics.com/v1/communities/:communityId/contextual/categories/:categoryId
GET https://api.mediarithmics.com/v1/communities/:communityId/contextual/entities/:entityId
POST https://api.mediarithmics.com/v1/communities/:communityId/contextual/analytics/overall_metrics
GET https://api.mediarithmics.com/v1/audience_segments/:segmentId/contextual_targetings
POST https://api.mediarithmics.com/v1/audience_segments/:segmentId/contextual_targetings/:contextualTargetingId/actions
POST https://api.mediarithmics.com/v1/audience_segments/:segmentId/contextual_targetings/:contextualTargetingId/actions
communityId*
integer
The ID of your community or organisation
url*
string
The URL for which you want to retrieve the list of attached targeting lists.
channel_id*
string
The ID of the channel associated with the URL.
organisationId*
integer
The ID of the organisation for which you want to retrieve the targeting lists
organisationId*
integer
The ID of the organisation
targetingListId*
Integer
The ID of the targeting list to retrieve
organisationId*
integer
The ID of the organisation
queryId*
Integer
The ID of the query retrieved in a seamntic targeting list
communityId*
integer
The ID of the community
categoryId*
Integer
The ID of the category to be retrieved
organisationId*
integer
The ID of the organisation
entityId*
Integer
The ID of the entity to be retrieved
organisationId*
integer
The ID of the organisation
segmentId*
integer
The ID of the audience segment on which
segmentId*
integer
The ID of the audience segment on which
contextualTargetingId*
Integer
The ID of the contextual targeting retrieved in creation response
type*
string
"PUBLISH"
volume_ratio*
float
% of audience segment reach (30-day page views) that will be used to calculate lift
activation_platforms*
array of strings
List of activation platforms where to activate the contexutal targeting. For instance ["XANDR"]
segmentId*
integer
The ID of the audience segment on which
contextualTargetingId*
Integer
The ID of the contextual targeting retrieved in creation response
type*
string
"ARCHIVE"
{
"status": "ok",
"data": {
"targeting_lists": [
{
"id": "123"
},
{
"id": "456"
}
]
}
}{
"status": "ok",
"data": [
{
"type": "SEMANTIC",
"id": "1",
"organisation_id": "1",
"status": "INIT",
"live_activation_ts": null,
"name": "Targeting_List_Name",
"short_description": "",
"token": "cardinal-ack",
"url_count": 21860,
"last_30_days_page_views": 8066996,
"created_ts": 1692607279222,
"created_by": "1",
"last_modified_ts": null,
"last_modified_by": null,
"archived": false,
"query_id": "1"
}
],
"count": 1,
"total": 1,
"first_result": 0,
"max_results": 10
}{
"status": "ok",
"data": {
"type": "SEMANTIC", // SEMANTIC, PANEL_BASED
"id": "1",
"organisation_id": "1",
"segment_id": "7105867", // Only for PANEL_BASED type
"volume_ratio": 0.8313403, // Only for PANEL_BASED type
"status": "INIT",
"live_activation_ts": null,
"last_lift_computation_ts": 1700100423716, // Only for PANEL_BASED type
"name": "Targeting_List_Name",
"short_description": "",
"token": "cardinal-ack",
"url_count": 21860,
"last_30_days_page_views": 8066996,
"created_ts": 1692607279222,
"created_by": "1",
"last_modified_ts": null,
"last_modified_by": null,
"archived": false,
"query_id": "1" // Only for SEMANTIC type
}
}{
"status": "ok",
"data": {
"id": "1",
"organisation_id": "1",
"query_data": {
"language_name": "JSON_SEMANTIC",
"language_version": "1",
"query": {
"include": {
"entity_ids": [
"1",
"2"
],
"iab_category_ids": [
"1"
]
},
"exclude": {
"entity_ids": [],
"channel_ids": [
"1",
"2",
"3",
"4",
"5"
],
"iab_category_ids": []
}
}
},
"created_by": "1",
"created_ts": 1692607279084,
"last_modified_by": null,
"last_modified_ts": null
}
}{
"status": "ok",
"data": {
"id": "25",
"name": "News and Politics>Politics>War and Conflicts",
"url_count": 13549,
"last_30_days_page_views": 4914430
}
}{
"status": "ok",
"data": {
"id": "287",
"name": "Paris Saint-Germain Football Club",
"type": "SoccerClub",
"wikidata_id": "Q483020",
"url_count": 4601,
"last_30_days_page_views": 2095819
}
}{
"status":"ok",
"data":
{
"url_count":13549,
"last_30_days_page_views":4914430
}
}{
"status": "ok",
"data": [
{
"type": "PANEL_BASED",
"id": "1",
"organisation_id": "1",
"segment_id": "1",
"volume_ratio": 0.8313403,
"status": "LIVE",
"live_activation_ts": 1678193619193,
"last_lift_computation_ts": 1700100423716,
"name": "Targeting_List_Name",
"short_description": null,
"token": "double-beer-maryland",
"url_count": 3746,
"last_30_days_page_views": 63824027,
"created_ts": 1678193048401,
"created_by": "1",
"last_modified_ts": 1700055578893,
"last_modified_by": "1",
"archived": false
}
],
"count": 1,
"total": 1,
"first_result": 0,
"max_results": 2147483647
}{
"status":"ok",
"data": {
"id":"143",
"segment_id":"128765",
"volume_ratio":0.33580595,
"status":"PUBLISHED",
"activation_platforms":["XANDR"],
"live_activation_ts":null,
"last_lift_computation_ts":1676542526247,
"created_ts":1676542452678,
"created_by":"3594",
"last_modified_ts":1676543040147,
"last_modified_by": "3594",
"archived":false
}
}{
"status": "ok",
"data": {
"id": "143",
"segment_id": "128765",
"volume_ratio": 0.33580595,
"status": "LIVE",
"activation_platforms": [
"XANDR"
],
"live_activation_ts": 1676543074426,
"last_lift_computation_ts": 1676542526247,
"created_ts": 1676542452678,
"created_by": "3594",
"last_modified_ts": 1676548450358,
"last_modified_by": "3594",
"archived": true
}
}