# Click tracking Macro for DSP's

Для отслеживания клика в баннерах SSP UMG ожидает, что DSP добавит макрос ${CLICK\_URL} или ${CLICK\_URL\_ENC} в adm в своем bid responce.&#x20;

SSP раскрывает его в свой URL трекинга клика таким образом, чтобы в конец можно было конкатенацией добавить URL редиректа.

Если в bid response в adm SSP видит макрос ${CLICK\_URL} на прим. ${CLICK\_URL}<http://example.com/>', он будет раскрыт в трекинг URL, прим. <https://ssp.com/click?params&dst=>

В конец мы подставяем URL для редиректа (click url), который окажется в dst параметре click трекера SSP. URL кодированный или не кодированный.&#x20;

В итоге при клике будет вызван, URL следующиего вида&#x20;

* Если макрос ${CLICK\_URL} - то в обычном виде = <https://ssp.com/click?dst=http%3A%2F%2Fexample.com%2F>
* Если макрос ${CLICK\_URL\_ENC} - то в url-encode виде = https%3A%2F%2Fssp.com%2Fclick%3Fdst%3Dhttp%3A%2F%2Fexample.com%2F

{% code title="DSP Bid responce with macros ${CLICK\_URL\_ENC}" lineNumbers="true" %}

```json
{
  "id": "de3492cb-4fcc-41d1-ac35-493c185b8cfe",
  "bidid": "de3492cb-4fcc-41d1-ac35-493c185b8cfe",
  "cur": "RUB",
  "seatbid": [
    {
      "bid": [
        {
          "id": "1",
          "impid": "1",
          "price": 2,
          "nurl": "https://log.bumlam.com/?src=untrtb1&s_act=s&s_trk=CgiLNz9JVZcsyhiUiOWvBg**&s_win=${AUCTION_PRICE}",
          "adid": "286963277",
          "crid": "286963277",
          "cid": "2743278974",
          "w": 300,
          "h": 250,
          "dealid": "umg-mediasniper-deal1",
          "adomain": [
            "evolution.tele2.ru"
          ],
          "adm": "<!DOCTYPE html> <html lang=\"en\">   <head> <meta name=\"ad.erid\" content=\"LjN8KBgwn\"> <meta name=\"ad.ordinfo\" content=\"{&quot;customer&quot;:{&quot;name&quot;:&quot;\\u041e\\u041e\\u041e \\&quot;\\u04222 \\u041c\\u043e\\u0431\\u0430\\u0439\\u043b\\&quot;&quot;,&quot;inn&quot;:&quot;7743895280&quot;}}\">      <meta charset=\"utf-8\">     <title>banner</title>     <meta name=\"ad.id\" content=\"D4DDAC711A255413-FD410505BB8ABAB4\"> <script type=\"text/javascript\">window.adsn=window.adsn ||{};window.adsn.viewability = {\"s_trk\": \"CgiLNz9JVZcsyhCVq-alDhiUiOWvBg**\", \"cr_id\":\"FD410505BB8ABAB4\", \"camp_id\":\"D4DDAC711A255413\"};</script> <script type=\"text/javascript\" src=\"https://static.bumlam.com/engine/viewability.js\"></script>      <style>       body {        margin: 0;        overflow:hidden;        }     </style>    </head>   <body> <script src=\"https://static.bumlam.com/helper/bannerSpeed.js?act=dc3\"></script>   <img src='https://pix.bumlam.com/audit/uniontraff/show?s_trk=CgiLNz9JVZcsyhCVq-alDhiUiOWvBg**&crid=tdm4%23751.35.29&domain=watchfeed%2Etv&format=b&rnd=1735959946' style='width:0px;height:0px;display:none;' /><script type=\"text/javascript\" src=\"https://bs.serving-sys.ru/Serving/adServer.bs?ncu=$$${CLICK_URL_ENC}https%253A%252F%252Flog%252Ebumlam%252Ecom%252Fnew%252Fc%252FCgiLNz9JVZcsyhCVq%252DalDhiUiOWvBg%252A%252A%252F%253Fnoclick$$&c=28&cn=display&pli=1087211912&w=300&h=250&ord=1735959946&LineID=$$s_trk=CgiLNz9JVZcsyhCVq-alDhiUiOWvBg**&erid=LjN8KBgwn$$&z=10000\" ></script></body> </html>",
          "ext": {
            "nroa": {
              "erid": "LjN8KBgwn",
              "has_nroa_markup": 1,
              "client": {
                "inn": "7743895280",
                "name": "ООО \"Т2 Мобайл\"",
                "legal_form": "ul",
                "mobile_phone": "",
                "epay_number": "",
                "reg_number": "",
                "alternative_inn": "",
                "oksm_number": ""
              },
              "contractor": {
                "inn": "7704231173",
                "name": "ООО \"Инишитив РУС\"",
                "legal_form": "ul",
                "mobile_phone": "",
                "epay_number": "",
                "reg_number": "",
                "alternative_inn": "",
                "oksm_number": ""
              },
              "initial_contract": {
                "id": "7d4a9d22-1fa2-4b5f-ae2d-99e5265ae88c",
                "ado_id": "ozon",
                "type": "intermediary-contract",
                "subject_type": "mediation",
                "action_type": "distribution",
                "number": "IN/23",
                "sign_date": "2022-12-29",
                "vat_included": true,
                "agent_acting_for_publisher": false,
                "parent_contract_id": ""
              },
              "parent_contracts": []
            }
          }
        }
      ]
    }
  ]
}
```

{% endcode %}

{% code title="Ad creative with macro ${CLICK\_URL\_ENC} expanded" lineNumbers="true" %}

```html
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta name="ad.erid" content="LjN8KBgwn">
        <meta name="ad.ordinfo" content="{&quot;customer&quot;:{&quot;name&quot;:&quot;\u041e\u041e\u041e \&quot;\u04222 \u041c\u043e\u0431\u0430\u0439\u043b\&quot;&quot;,&quot;inn&quot;:&quot;7743895280&quot;}}">
        <meta charset="utf-8">
        <title>banner</title>
        <meta name="ad.id" content="D4DDAC711A255413-FD410505BB8ABAB4">
        <script type="text/javascript">
            window.adsn = window.adsn || {};
            window.adsn.viewability = {
                "s_trk": "CggE3f-TUuaPjhCVq-alDhjqgOWvBg**",
                "cr_id": "FD410505BB8ABAB4",
                "camp_id": "D4DDAC711A255413"
            };
        </script>
        <script type="text/javascript" src="https://static.bumlam.com/engine/viewability.js"></script>
        <style>
            body {
                margin: 0;
                overflow: hidden;
            }
        </style>
    </head>
    <body>
        <script src="https://static.bumlam.com/helper/bannerSpeed.js?act=dc3"></script>
        <img src='https://pix.bumlam.com/audit/uniontraff/show?s_trk=CggE3f-TUuaPjhCVq-alDhjqgOWvBg**&crid=tdm4%23751.35.29&domain=watchfeed%2Etv&format=b&rnd=1524543448' style='width:0px;height:0px;display:none;'/>
        <script type="text/javascript" src="https://bs.serving-sys.ru/Serving/adServer.bs?ncu=$$https%3A%2F%2Fa.utraff.com%2Ftr%2Fv4%3Fev%3Dobl5FhVszhngDVJefefSPqDDRhAdAAUwiL_MWCFCLDJnKN2K79X1v9zHvCi0I5FQQTwZYOTuKYkj7hss3wR9ajNorraki3UhKUU2aZLD2LjL9cdOPWBNYKy0yUd5hJM26Zs-DRymRsm4O6YGjjWzCG5d1Msqt2p3P_amfKgp-NQTR4NuCNQHrxFeW0UwoS_tt1vVddWHR4qfK0PqVzOrOXtMZLKB8ChoAX5fEqk7Hh12T2rwmMYNdDifnNNONgHQYHPkM4ZQoTRG6e-XuSmi66oogJ_EN9NGrDUNi7gfI0ajv5aP1G9M05__JmCsvHaf8b-i9aQhwIlG9JzV8oEBIA%26dest%3Dhttps%253A%252F%252Flog%252Ebumlam%252Ecom%252Fnew%252Fc%252FCggE3f%252DTUuaPjhCVq%252DalDhjqgOWvBg%252A%252A%252F%253Fnoclick$$&c=28&cn=display&pli=1087211912&w=300&h=250&ord=1524543448&LineID=$$s_trk=CggE3f-TUuaPjhCVq-alDhjqgOWvBg**&erid=LjN8KBgwn$$&z=10000"></script>
    </body>
</html>
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.umg.team/main/ussp.io/click-tracking-macro-for-dsps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
