DFP Ad Unit Render Order Weight affects google DFP response

Created on 20 October 2016, almost 9 years ago
Updated 20 July 2025, 8 days ago

Issue
Moving to asynchronous SRA (Single Request Architecture) mode for DFP, found that the DFP module renders all Ad Units using drupal_add_js but all having the same weight = 0;
The order that DFP tags are rendered makes a difference to the way DFP responds especially when using Master Companion takeover which apparently is the correct way to do roadblocking according to google, documented under Set up master/companion roadblocks

The DoubleClick ad server always processes ad requests from a webpage or mobile app sequentially, in the order in which the requests are received. Even with single-request mode, the sequence for ad request processing is defined by the order of the googletag.defineSlot() functions in your tagging code.

Without adding more to the interface of DFP, and making this an optional item that can be set for an ad unit, I thought about using the Targeting system.

Attached is a solution that allows you to define "weight" as a target and for it to render that, if weight is not defined it renders the slot as weight = 99.

Feature request
Status

Closed: outdated

Version

1.4

Component

Code

Created by

🇦🇺Australia velocis

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024