All pages
Powered by GitBook
1 of 7

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Equativ

Description

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.

Prerequesite

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

Setup

You'll need to provide your Equativ's credentials to your mediarithmics Account manager and especially the following :

  • Client ID

  • Client secret

Equativ tag

Contextual targeting

Context

Check User guides documentation to learn more about this feature.

Prerequisites

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)

Setup

To configure the Contextual targeting feature, follow the setup steps below depending on your needs:

  1. - MANDATORY. This initial configuration is required for all customers using the Contextual targeting feature

  2. - 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

General setup

To configure Contextual targeting feature (contextual extraction & semantic analysis), please follow the next steps IN ORDER:

  1. Schema update

Xandr (through prebid.js)

Description

This client-side connexion allows you to synchronize a targeting list with Xandr Monetize and therefore run your media campaigns on this targeting list.

Prerequesite

To synchronize your targeting lists with Xandr Monetize, you will need to :
  • Setup prebid.js on your website

  • Have an active account on Xandr Monetize solution

Setup

You'll need to provide your Xandr's credentials to your mediarithmics Account manager and especially the following :

  • Username

  • Passsword

User event tag
Contextual targeting tag
User activities import
General setup
Activation setup
Event rule configuration

Schema update

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.

Event rule configuration

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.

Blacklist URL

Add a URL to blacklist per line. ALL URLs provided should NOT have protocol in it (http://, https://). For example:

Blacklist Regexp

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/actu
mediarithmics*.io/homepage

Activation setup

To configure Targeting lists activation, please follow the next steps:

  1. Contextual snippet installation (for website activation)

  2. Targeting list / URL API implementation (for mobile app activation)

  3. Activation plaftorm specific setup (for website & mobile app activation)

Contextual snippet installation

Setup

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:

  1. The configuration that you should fill according to your context (site token & snippet name)

  2. 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.

  • The two common ways to integrate the snippet are:

    • Through a universal tag container like Google Tag Manager or another similar solution. The code snippet must be copied once in a new tag and the tag container service automatically inserts the code wherever it is needed.

Additional step for SPA

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.

How it works

Contextual targeting tag will automatically:

  1. Identifies the URL browsed by an anonymous user

  2. Determines which targeting lists are associated to the URL

  3. Proceeds to key/value targeting with the configured activation platforms

Targeting list / URL API implementation

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:

  1. Integrate our dedicated API to within your mobile app.

    1. Review the to learn more about how to autenticate when making API calls

    2. 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.

Activation plaftorm specific setup

To enable activation on external platforms, follow the setup guide corresponding to each platform:

By inserting the code snippet in a general purpose template (ex: header template for an e-shop) which is used in all the web site pages.
  • 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.

    fetch the targeting lists associated with a given URL
    Signature Authentication documentation
    Google Ad Manager
    Xandr (through prebid.js)
    Equativ
    <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 snippet

    Google Ad Manager

    Description

    This 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.

    Prerequesite

    To synchronize your targeting lists with Google, you will need to :

    • Setup on your website

    • Have an active account on Google Ad Manager

    Setup

    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.

    Please reach out to your Account manager to get the Contextual targeting service account user.

    Google Publisher Tags

    API documentation

    Retrieve targeting lists for a given URL

    POST https://api.mediarithmics.com/v1/communities/:communityId/contextual/semantic_extraction

    Path Parameters

    Name
    Type
    Description

    Request Body

    Name
    Type
    Description

    Retrieve all targeting lists

    GET https://api.mediarithmics.com/v1/organisations/:organisationId/contextual/targeting_lists

    Path Parameters

    Name
    Type
    Description

    Retrieve targeting list basic information

    GET https://api.mediarithmics.com/v1/organisations/:organisationId/contextual/targeting_lists/:targetingListId

    Path Parameters

    Name
    Type
    Description

    Retrieve semantic targeting list query

    GET https://api.mediarithmics.com/v1/organisations/:organisationId/contextual/queries/:queryId

    Path Parameters

    Name
    Type
    Description

    Retrieve IAB category information

    GET https://api.mediarithmics.com/v1/communities/:communityId/contextual/categories/:categoryId

    Path Parameters

    Name
    Type
    Description

    Retrieve entity information

    GET https://api.mediarithmics.com/v1/communities/:communityId/contextual/entities/:entityId

    Path Parameters

    Name
    Type
    Description

    Retrieve overal metrics for a particular query

    POST https://api.mediarithmics.com/v1/communities/:communityId/contextual/analytics/overall_metrics

    Path Parameters

    Name
    Type
    Description

    Retrieve panel based contextual targeting settings

    GET https://api.mediarithmics.com/v1/audience_segments/:segmentId/contextual_targetings

    Path Parameters

    Name
    Type
    Description

    Publish a contextual targeting (LIVE)

    POST https://api.mediarithmics.com/v1/audience_segments/:segmentId/contextual_targetings/:contextualTargetingId/actions

    Path Parameters

    Name
    Type
    Description

    Request Body

    Name
    Type
    Description

    Archive a contextual targeting

    POST https://api.mediarithmics.com/v1/audience_segments/:segmentId/contextual_targetings/:contextualTargetingId/actions

    Path Parameters

    Name
    Type
    Description

    Request Body

    Name
    Type
    Description

    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
        }
    }