Follow

Customizing Your Distil Bot Discovery Tag

This article discusses ways you can configure additional Distil Bot Discovery tag parameters to further customize your reporting.

The primary Distil Bot Discovery tag is a simple script tag:

Method

/script

Call

GET
https://cdn.distiltag.com/api/v1/script/<pub_key>/

Description

Loads the Distil Bot Discovery tag JS code for the specified publisher key

Required URL Parameters

<pub_key>


Distil has an optional noscript call if your system doesn’t support JavaScript (JS):

Method

/noscript

Call

GET https://cdn.distiltag.com/api/v1/noscript/<pub_key>

Description

Used when the visitor’s browsers do not allow and/or support JS to run.

Required URL Parameters

<pub_key>


You can also input these values in the Advanced Options field of the Custom Tag Generator within the
Distil Bot Discovery Dashboard. If you do not already have a Distil Bot Discovery tag, visit discovery.distilnetworks.com to get started.

Optional Query Parameters

Distil also supports a number of other optional query parameters to further customize the information collected for your reports. You can use these by adding additional queries to your existing tag.  

Parameter

Description

Example

AYAH_[L,F,P][0-4]

Custom parameters used for slicing and grouping data in reports.

NOTE: Make sure that all parameters only use ASCII characters, contain no spaces, and are URL encoded.

RECOMMENDED

  • P1 – impression id
  • P2 – partner user id

OPTIONAL

  • L0 – ad partner
  • L1 – advertiser
  • L2 – campaign
  • L3 – line item
  • L4 – creative
  • F1 – account
  • F2 – site
  • F3 – placement
  • F4 – device type
  • P0 – tracking partner

AYAH_L0=%%Custom- Macro%%


AYAH_L0=0123456


Distil Bot Discovery Tags Example

The following tags are examples of basic and configured Distil Bot Discovery tags.

NOTE: These are examples only and are not intended for actual use, as they include random publisher keys, Google Analytics IDs, and custom dimension IDs.

Sample Tag With No Parameters

NOTE: The italicized text in the following example should be replaced with your unique publisher key, provided upon your Distil Bot Discovery account signup.

<script type="text/javascript" src="https://cdn.distiltag.com/api/v1/script/abcdefghijklmnoz123456790"></script>
<noscript><img src="https://cdn.distiltag.com/api/v1/noscript/abcdefghijklmnoz123456790"></noscript>

Sample Tag with Manually Entered Parameter Values

NOTE: The italicized text in the following example should be replaced with your unique publisher key, GA ID, and custom dimension ID.

<script type="text/javascript" src="https://cdn.distiltag.com/api/v1/script/abcdefghijklmnoz123456790?AYAH_L1=Ford&AYAH_L2=Escape&AYAH_L3=2014_Q3_Liftgate&AYAH_L4=C1398478"></script>
<noscript><img src="https://cdn.distiltag.com/api/v1/noscript/abcdefghijklmnoz123456790?AYAH_L1=Ford&AYAH_L2=Escape&AYAH_L3=2014_Q3_Liftgate&AYAH_L4=C1398478"></noscript>

Sample Tag with Macros Inserted

NOTE: In this instance, macros are encapsulated by ‘%%’). Additionally, the italicized text in the following example should be replaced with your unique publisher key, GA ID, and custom dimension ID.

NOTE: In this instance, the macros are the values encapsulated by ‘%%’)

<script type="text/javascript" src="https://cdn.distiltag.com/api/v1/script/abcdefghijklmnoz123456790?&AYAH_P0=ttd&AYAH_P1=%%IMPRESSIONID%%&AYAH_P2=%%UID%%&AYAH_F1=%%VENDOR%%&AYAH_F2=%%SITE%%&AYAH_L1=%%ADVERTISERID%%&AYAH_L2=%%ADGROUPID%%&AYAH_L3=%%CAMPAIGNID%%&AYAH_L4=%%CREATIVEID%%"></script><noscript> <img src="https://cdn.distiltag.com/api/v1/noscript/abcdefghijklmnoz123456790?&AYAH_P0=ttd&AYAH_P1=%%IMPRESSIONID%%&AYAH_P2=%%UID%%&AYAH_F1=%%VENDOR%%&AYAH_F2=%%SITE%%&AYAH_L1=%%ADVERTISERID%%&AYAH_L2=%%ADGROUPID%%&AYAH_L3=%%CAMPAIGNID%%&AYAH_L4=%%CREATIVEID%%"></noscript>

 

Accessing Real-Time Bot Data

The preceding described data can be accessed through a batch sync or Distil’s reporting dashboard. You must provide an endpoint using either a tracking pixel or an API call to receive real-time data for each impression.

Macros

Before reviewing the endpoint options you should understand the appropriate macros. Each time the Distil Bot Discovery tag is invoked, we will initiate a callback to a provided endpoint and fill in the appropriate macros, described here:

Macro

Required?

Definition

Example Data

[botviolationcode]

Optional

Code Value


1 = bot

0 = not bot

-1 = no data

x-distil-bot-discovery=0

x-distil-bot-discovery=1

x-distil-bot-discovery=-1

[AYAH_L*]

Value of any custom parameter passed into our script tag.

advertiser=Ford

campaign=Liftgate

creative=C1398478

[AYAH_F*]

[AYAH_P*]

[CACHEBUSTER]

Random number used to prevent caching.

 


Endpoint Option: Tracking Pixel

Pixels are typically used to track data associated with each impression. If you have one you can use to ingest the human/bot data, send it to Distil so we can call it each time you load our Bot Discovery Tag.

Example:

http://someserver.com/img/trans.gif?advertiser=[AYAH_L1]&campaign=[AYAH_L2]&creative=[AYAH_L4]&x-distil-bot-discovery=[botviolationcode]

Endpoint Option: API Call

Distil also supports API use to collect more detailed information. We typically send JSON data in the following format:

POST http://someserver.com/api/v1/impression/[AYAH_L1]/[AYAH_L2]/[AYAH_L4]

Example:

{
version: 1.0,
advertiser_name: [value of AYAH_L1 parameter passed to Bot DiscoveryTag],
campaign_name: [value of AYAH_L2 parameter passed to Bot DiscoveryTag],
creative_id: [value of AYAH_L4 parameter passed to Bot DiscoveryTag],
x-distil-bot-discovery: [botviolationcode]
}
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments