Contact support

Set up passbacks

Overview

You can request programmatic ads from Equativ's demand partners by implementing Equativ ad tags in your primary ad server. For ad opportunities that cannot be monetized by Equativ's demand partners, you can set up passbacks to redirect such ad opportunities to other platforms or partner.

The passback method described in this document is only supported in web and mobile web environments.

 

Setup

To set up passbacks, proceed as follows:

  1. In your primary ad server, set up line items which represent Equativ as an SSP. Create a separate line item for each format/size.
  2. In EMP, set up and retrieve Standalone ad tags.
  3. Add the Standalone ad tags as creatives (redirects) to your line items.
  4. Once the ad tags are implemented, the onNoad: function() will be called whenever an ad opportunity cannot be monetized by an Equativ demand partner.

 

If the passback URL is in your primary ad server where you have created the line items, you must make sure that the line items are never called by the passback URL. Otherwise, an "infinite loop" will occur: the line item calls itself repeatedly. Typically, you can avoid this risk with a keyword inserted in the passback URL and an exclusion keyword targeting in each line item. This ensures that your ad server cannot select the line item again due to its exclusion keyword targeting.

 

Passback to JavaScript URL

Example 1: generic Javascript URL

In the following ad tag, the called JavaScript URL is https://Your.PassBackUrl.com&tag=myAdTag. Replace this URL by your passback URL. 

<script src="//ced.sascdn.com/tag/620/smart.js" async></script>
<div id="sas_12345"></div>
<script>
    var sas = sas || {};
    sas.cmd = sas.cmd || [];
    sas.cmd.push(
        function () {
            sas.call(
                { siteId: 12345, pageId: 67890, formatId: 12345, tagId: "sas_12345" },
                { networkId: 620, domain: "//www5.smartadserver.com",
                    onNoad: function() {
                        var s = document.createElement("script");
                        s.src = "https://Your.PassBackUrl.com&tag=myAdTag";
                        document.getElementById("sas_12345").appendChild(s);
                    }
                }
            );
        }
    );
</script>

 

Example 2: AdSense script

<script src="//ced.sascdn.com/tag/2079/smart.js" async></script>
<div id="sas_12345"></div>
        <script>
            var sas = sas || {};
            sas.cmd = sas.cmd || [];
            sas.cmd.push(
                function () {
                    sas.call(
                        { siteId: 12345, pageId: 67890, formatId: 12345, tagId: "sas_12345" },
                        { networkId: 2079, domain: "http://www8.smartadserver.com", 
                            onNoad: function() {
                                sas.appendHtml("sas_12345", '<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:inline-block;width:300px;height:250px\"\r\n     data-ad-client=\"ca-pub-6241792720477274\"\r\n     data-ad-slot=\"8547011044\"><\/ins>\r\n<script>\r\n(adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>');
                            }
                        }
                    );
                }
            );
        </script>

 

Example 3: GPT

The following ad tag uses the defineSlot function. Make the following replacements:

  • 1111: replace by the Equativ network ID.
  • 22222 : replace by the format ID of the actual placement.
  • 33333 : replace by the site ID of the actual placement.
  • 44444 : replace by the page ID of the actual placement.
  • /55555555/ad-unit-campaign: replace by adUnitPath from GAM. For more information, see GPT Reference.
  • [[320, 480], [300, 600], [300, 250]]: replace by the acceptable sizes for the placement.
  • gpt-passback: replace by the name of the targeted div where the ad will render.
<script type="application/javascript" src="https://ced.sascdn.com/tag/1111/smart.js" async></script>
<div id="sas_22222"></div>
<script type="application/javascript">
    var sas = sas || {};
    sas.cmd = sas.cmd || [];
    sas.cmd.push(
        function () {
            sas.call(
                { siteId: 33333, pageId: 4444444, formatId: 22222, tagId: "sas_22222" },
                { networkId: 1111, domain: "https://www5.smartadserver.com", onNoad:
                    function() {
                        var gdiv = document.createElement("div");
                        gdiv.setAttribute("id", "gpt-passback");
                        document.getElementById("sas_22222").appendChild(gdiv);

                        var s2 = document.createElement("script");
                        s2.src = "https://www.googletagservices.com/tag/js/gpt.js";
                        s2.text = "googletag.defineSlot('/55555555/ad-unit-campaign, [[320, 480], [300, 600], [300, 250]], 'gpt-passback').addService(googletag.pubads());"

                        s2.text += "googletag.enableServices();"
                        s2.text += "googletag.display('gpt-passback');"

                        document.getElementById("sas_22222").appendChild(s2);
                    } 
                }
            );
        }
    ); 
</script> 

Passback to HTML fragment 

In case of passbacks to an HTML fragment, proceed as follows: 

  • Replace any double quotes  ("") by single quotes.
  • Delete code comments (content contained in //, <! -, / * and ->, * /).
  • If the entire ad tag is in a single row, add double quotes at the beginning and at the end. The entire contents of the chain must be in a single row.

Example

In the following ad tag, the called HTML fragment URL is https://Your.PassBackUrl.com&tag=myAdTag. Replace this URL by your passback URL.

<script src="//ced.sascdn.com/tag/620/smart.js"; async></script>
<div id="sas_53135"></div>
<script>
    var sas = sas || {};
    sas.cmd = sas.cmd || [];
    sas.cmd.push(
        function () {
            sas.call(
                { siteId: 149676, pageId: 778182, formatId: 53135, tagId: "sas_53135" },
                { networkId: 620, domain: "//www5.smartadserver.com",
                    onNoad: function() {
                        sas.appendHtml("sas_53135", '<scr'+'ipt src="https://Your.PassBackUrl.com&tag=myAdTag" async></scr'+'ipt>');
                    }
 }
            );
        }
    );
</script>