DoubleClick Floodlight Destination


The DoubleClick Floodlight destination allows you to make calls directly to Floodlight based on your mapped events. All you have to do is enter your DoubleClick Advertiser ID in the Doubleclick Floodlight destinations settings in the Segment App, then map the Segment track events to their corresponding Floodlight tags.

This destination requires that mobile implementations send device-specific information such as the IDFA or the AdvertisingId, so you should send events using one of the Segment mobile libraries. You can also send data from Analytics.js and Segment makes direct HTTP requests to Doubleclick Floodlight from your browser.

Track

Before you send track events to DoubleClick Floodlight, you must first go to the DoubleClick Campaign Manager and create the Floodlight tags (Sales or Counter). Once you do that, you can map the Segment events to those tags from in the destination’s settings in the Segment App.

To track custom properties first create custom variables inside DoubleClick Campaign Manager.

After you finish configuring Doubleclick Floodlight, Segment maps the following properties and settings when it receives a mapped event:

  • dc_rdid is set as IDFA or AdvertisingId (for mobile data only)
  • src is pulled from your destination settings
  • cat and type are pulled from your event mappings from the settings OR your top level Activity Tag and Group Tag settings
  • ord for counter tags are a random number to prevent browser caching
  • ord for sales tags are set to whatever you define in your settings! (ie. properties.order_id) Include the properties. prefix to the key to ensure Segment finds the associated value in your properties object.
  • qty for sales tags only, Segment sums the quantity of products in your products array property or falls back on top level properties.quantity
  • cost for sales tags only Segment sends the revenue
  • u$ (if any) is pulled from your property mapping setting
  • dc_lat is set to 0 or 1 depending on whether the device has Limit Ad Tracking enabled (for mobile data only)

Important: Floodlight requires that you set a User-Agent header with that of the app where the track event took place. The Segment Android and Analytics.js (javascript) library automatically collect the userAgent. However you must manually send the user agent string inside the context object if you are using the iOS library. If context.userAgent is not provided, Segment tries to generate a user agent string based on some device and operating system information that is already has.

A generated user agent string might look something like the following:

Segment/1.0 (iPhone OS; CPU iPhone7,2; en-US) Apple; Version 8.1.3

Example

Assuming the below is an example Floodlight tag mapping:

floodlight-tag-settings

With the following track call:

[[SEGAnalytics sharedAnalytics] track:@"Free El"
                           properties:@{ @"show": @"Stranger Things", @"source": @"Netflix", @"greatestShowEver": YES }];

Will send the following GET request to DoubleClick Floodlight:

https://ad.doubleclick.net/ddm/activity/src=1234567;cat=fghij456;type=abcde123;dc_rdid=38400000-8cf0-11bd-b23e-10b96e4ddddd;u1=Stranger%20Things;u2=Netflix;u3=true;ord=1312312312;dc_lat=0

Accessing Other Event Properties

By default, the Segment event property you define for each custom variable mapping will be matched against the property values found in the properties object of a track event. You can, however, use JSON style dot-notation-accessors wrapped in double curly brackets to map to any property in the event’s raw payload to your custom variables. For example, some acceptable values could be context.campaign.name, context.userAgent, or anonymousId (inside of the double curly brackets). You can find the complete structure of a standard Segment event payload here.

Note: dc_rdid and dc_lat are automatically collected by our mobile libraries and ord is uniquely generated for each event.

Page

The Segment DoubleClick Floodlight destination also supports tracking named page events as conversions. To enable this feature, follow the same steps explained above for track events but in the destination settings, enter the conversion “event” name. Use the structure in the example below, replacing PAGE NAME with the name parameter you pass to the Segment page event:

Viewed PAGE NAME Page

Here’s an example for tracking a page event with the name Confirmation:

page event as track event

The name is case sensitive.

See the Analytics.js documentation for more on the name parameter.

Pages with categories

If you are passing category names to page events you would like to track as conversions, you must slightly modify the event name you input into your destination settings. Instead of Viewed PAGE NAME Page, enter it as: Viewed CATEGORY NAME PAGE NAME **Page

For example, if you had a page event with the name as Confirmation that was being categorized as part of a group of Checkout pages, you would enter:

Viewed Checkout Confirmation Page

See the Analytics.js documentation for more on the category paramter.

Setting up Custom Variables

There are two things you need to do in order to send custom track properties as custom Floodlight variables. Firstly, refer to their docs on how to create a custom variable inside DoubleClick:

Custom Floodlight variables use the keys u1=, u2=, and so on, and can take any values that you choose to pass to them. You can include custom Floodlight variables in any of your Floodlight activity tags and report on their values in Report Builder.

To create or edit a custom variable:

For each custom variable you want to create or edit, enter a Friendly Name, which is the name for the variable that is used in reports. For example, if you are using a custom variable to include users’ ZIP codes in the Floodlight tags, you could use ZIP Code as the Friendly Name.

Choose the Type of custom variable you’re creating. Choose string if you want the variable to include alphanumeric characters or special characters. The only characters you can’t use are “, < and >. Choose number if you want to pass numeric values.

If you add Custom Floodlight Variables to a report as metrics, they are summed in the report as if they are numeric values, even if the variables are actually strings. The string variables will display a value of 0.

Click Save.

COPPA Compliance

DoubleClick Floodlight lets you set a parameter called tag_for_child_directed_treatment as either 0, or 1 to mark a specific tag as coming from a user under the age of 13, under the COPPA compliance privacy law.

If you want to set this flag, you can send an integration option namespaced as coppaCompliant with true or false (default):

Analytics.with(context).track("Free El", new Properties().putValue("show", "Stranger Things").putValue("source", "Netflix").putValue("greatestShowEver", true), new Options().setIntegrationOptions("DoubleClick Floodlight", new ValueMap().putValue("coppaCompliant", true)));

Tip: This flag was previously called copaCompliant (a typo) instead of coppaCompliant. The method has been aliased to preserve the old functionality, and you do not need to update it if you used the old spelling.

Sending Personally Identifiable Information (PII)

Do not map custom variables that contain Personally Identifying Information (PII). Refer to this warning by DoubleClick:

The terms of your DoubleClick contract prohibit passing any information to us that we could use or recognize as personally identifiable information (PII). If you enter certain key-values into a field in a DoubleClick product, you may see a warning that reminds you that you must not use key-values to pass data that we would recognize as PII. Key-values that trigger this warning include, for example, email and username. Note that it is okay to use these key-values if your purpose is not to collect information that DoubleClick could use or recognize as PII. (For example, email=weekly is fine, but passing a user’s email address is not.) If you do choose one of these key-values, DoubleClick may contact you in the future to confirm that you are not using them in a way that is prohibited.

Personas

You can send computed traits and audiences generated using Segment Personas to this destination as a user property. To learn more about Personas, contact us for a demo.

For user-property destinations, an identify call is sent to the destination for each user being added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicade membership. For example, when a user first completes an order in the last 30 days, Personas sends an Identify call with the property order_completed_last_30days: true. When the user no longer satisfies this condition (for example, it’s been more than 30 days since their last order), Personas sets that value to false.

When you first create an audience, Personas sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

Supported Sources and Connection Modes

Before you start, make sure DoubleClick Floodlight supports the source type and connection mode you’ve chosen to implement. You can learn more about connection modes here.

Web Mobile Server
📱 Device-mode
☁️ Cloud-mode

Segment offers an optional Device-based Connection Mode for Mobile data going to DoubleClick Floodlight, so that you can use DoubleClick Floodlight features that collect data directly from the mobile device. To do this, you must package the Segment-DoubleClick Floodlight mobile SDK with the Segment mobile library.

Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

Activity Tag

This setting maps to the Doubleclick Floodlight container activity tag (or cat) string. You can choose to use this setting to define the same value for this parameter across all conversion events or you can define this value for each of your conversion event mappings below.

Authorization Token for server-to-server requests

Please add the Token to send your conversions using the server-to-server endpoint from DisplayVideo 360.

Conversion events

Use these fields to map your Segment event names to Floodlight tags. We’ll only send Floodlight the conversion events you specify.

DoubleClick Advertiser ID

Your advertiser ID that is the source of the Floodlight activity. This should be the src of your tag string.

Get DoubleClick Id

Enable this setting if you would like to use Google’s cookie matching functionality. Please also ensure you provide a value in the Google Network Id setting.

Google Network Id

Provide your Google Network Id here if you have enabled cookie matching (Get DoubleClick Id setting).

Group Tag

This setting maps to the Doubleclick Floodlight container group tag (the type parameter) string. You can choose to use this setting to define the same value for this parameter across all conversion events or you can define this value for each of your conversion event mappings below.

Segment Write Key

Set here the write key for this source. It’s required if cookie matching is enabled.

Use Transaction Counting (Client Side Only)

Enable setting this if you want to use the Transaction Counting Method instead of Items Sold method when assigning qty value in the iframe.

This page was last modified: 24 Jul 2020

Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account