4 - External user identification

Overview

In real time bidding, browsers which reject third party cookies by default represent a major industry problem since users cannot be re-identified properly. In particular, this occurs in the context of mobile web.

Some buyers have responded to the problem with custom solutions, one of which is Criteo's "Real-Time User Sync" (RTUS).

Smart AdServer supports such solutions with a partner-specific external user Id which is attached to the ad call and included in the bid request.

This article will focus on Criteo's RTUS technology since this is Smart AdServer's first integration of this kind. However, the technology is open to other vendors.

Benefits

Technologies, such as Criteo's RTUS, boost RTB+ performance since buyers can bid on additional impressions. Smart AdServer has seen a significant uplift on Safari, which has particularly strict third party cookie settings.

Criteo RTUS integration

Asynchronous tagging

Smart AdServer recommends full asynchronous tagging (calling both Smart AdServer's library as well as the actual ad tag asynchronously).

The RTUS integration is possible with both OneCall (recommended) and Standard tagging.

Setting up a callback function

A callback function must be set up:

<script>
        var criteoCallback = function (data) {
            if (data && data.status === "OK") {
                sas.cmd.push(function () { sas.setPartnerId("79", data.userid); });
            }
            sas.cmd.push(function(){sas.render();});
        }
 
        setTimeout(criteoCallback, 200); // Force rendering after 200ms if criteo didn't answer on time.
    </script>.

Note 1
For safety reasons, there is a timeout of 200 ms. In case Criteo does not respond within this period, the ad call will be done without Criteo's user data.

Note 2
The PartnerId "79" is the partner Id which Smart AdServer assigned to Criteo.

Calling the Criteo RTUS service

To get the Criteo user id, the Criteo RTUS service must be called with the callback function in the j= parameter:

https://gum.criteo.com/sync?c=147&r=2&j=sas.criteoCallback 

Parameters:
c=  (integer) - Caller identifier (the id 147 is the static Id Criteo assigned to Smart AdServer)
j=  (string) - JSONP callback function (you can change sas.criteoCallback to a custom name)

Response if user is known by Criteo:

sas.criteoCallback({"status":"OK","userid":"JT7I427KrvrAxjGheTBogLhTQJAb0C3Z"});

Response if user is unknown by Criteo:

sas.criteoCallback({"status":"Unknown","userid":""});

Checking the integration

The integration is implemented correctly when the ad call includes the parameter &extuid-79=USERID:

http://www.smartadserver.com/ac?nwid=0&siteid=1&pgid=2&fmtid=3&visit=m&tmstp=3456360651&orgfmtid=3&tag=sas_3&pgDomain=file://&extuid-79=j25LGYWuMPsiQ7v-xdnSf7VE1P9LhoKj

Example 1 - OneCall tagging

This OneCall example works fully asynchronously (recommended implemention method).

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>RTUS Integration Test - One Call Async Tagging</title>
    <script src="http://ak-ns.sascdn.com/diff/js/smart.js" async></script>
    <script>
        var sas = sas || {};
        sas.cmd = sas.cmd || [];
        sas.cmd.push(function() {
            sas.setup({ domain: "http://www.smartadserver.com", async: true, renderMode: sas.renderMode.ON_DEMAND });
        });
    </script>
    <script>
        var criteoCallback = function (data) {
            if (data && data.status === "OK") {
                sas.cmd.push(function () { sas.setPartnerId("79", data.userid); });
            }
            sas.cmd.push(function(){sas.render();});
        }
 
        setTimeout(criteoCallback, 200); // Force rendering after 200ms if criteo didn't answer on time.
    </script>
    <script src="https://gum.criteo.com/sync?c=147&r=2&j=criteoCallback" async></script>
    <script>
        sas.cmd.push(function() {
            sas.call("onecall", {
                siteId:     1000003653,
                pageId:     1000006887,
                formatId:   "1000008106",
                target:     ""
            });
        });
    </script>
</head>
<body>
    <div id="sas_1000008106"></div>
    <script>
        sas.cmd.push(function() { sas.render("1000008106"); });
    </script>
</body>
</html>

Example 2 - Standard tagging

This Standard call example works fully asynchronously (recommended implemention method).

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>RTUS Integration Test - Standard Call Async Tagging</title>
    <script src="http://ak-ns.sascdn.com/diff/js/smart.js" async></script>
    <script>
        var sas = sas || {};
        sas.cmd = sas.cmd || [];
 
        sas.cmd.push(function() {
            sas.setup({ domain: "http://www.smartadserver.com", async: true, renderMode: sas.renderMode.ON_DEMAND });
        });
    </script>
    <script>
        var criteoCallback = function (data) {
            if (data && data.status === "OK") {
                sas.cmd.push(function () { sas.setPartnerId("79", data.userid); });
            }
            sas.cmd.push(function(){sas.render();});
        }
 
        setTimeout(criteoCallback, 200); // Force rendering after 200ms if criteo didn't answer on time.
    </script>
    <script src="https://gum.criteo.com/sync?c=147&r=2&j=criteoCallback" async></script>
</head>
<body>
    <div id="sas_1000009014"></div>
    <script type="text/javascript">
        sas.cmd.push(function () { sas.call("std", { siteId: 1000003653, pageId: 1000006887, formatId: 1000009014, target: "" });});
    </script>
</body>
</html>
Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk