Sharing Floodlight Settings Across Advertisers

Wednesday, April 27, 2011 |

The DoubleClick for Advertisers feature known as Floodlight allows you to gather metrics on specific actions taken by users who visit your site after viewing or clicking on one of your ads. The Help Center guide on using Floodlight provides a breakdown on what the features and settings do and how you can use them. The DFA API currently uses the legacy term “Spotlight” when referring to Floodlight settings. We will refer to all objects by their API names.

Setting up Floodlight tracking through the API exposes one notable difference from the UI workflow explored by the Help Center guide: Floodlight settings are tied to a SpotlightConfiguration object, not to an advertiser. These configuration objects can be associated with additional advertisers. A new SpotlightConfiguration is generated every time an advertiser is created, and although they share the same ID number, both objects are distinct from each other.

The first step to sharing settings is to set up the configuration that is going to be used. The choice of which configuration to use is not especially meaningful. You should pick one of the advertisers who is going to be in the group sharing these settings and use its accompanying configuration. This advertiser will not have a special status in the group using the same settings; all of the advertisers use the settings in the same way. Once you've picked your configuration, set up all the SpotlightActivities and SpotlightActivityGroups that you will need.

Sharing through the API is simple: Advertisers have a field named spotId which takes in the SpotlightConfiguration's ID number. You have to fetch your advertisers from the server, change this field to the shared configuration ID number, and then save the advertisers. In code, doing this would be as simple as:

// The ID of your set-up configuration here.
long sharedConfigId = 12345;
// The IDs of your advertisers who will share here.
long[] idsOfAdvertisersSharing = {23456, 34567, 45678};

// Fetch the advertisers who need to receive settings.
AdvertiserSearchCriteria advSearchCriteria =
new AdvertiserSearchCriteria();
AdvertiserRecordSet recordSet =

// Update your advertisers.
for (Advertiser advertiser: recordSet.getRecords()) {

Once you’ve got this set up, you can easily share with more advertisers by grabbing any advertiser currently using your configuration and inspecting its spotId field to get your configuration’s ID number.

As a final pointer, if you’re looking for the base configuration settings, you’ll want to modify your SpotlightConfiguration object. Though the UI displays these settings as part of the advertiser, they reside in the SpotlightConfiguration through the API.

If you have any additional questions about setting up Floodlight through the API, you’re always welcome to voice them at our forum.

- Joseph DiLallo, the DFA API Team