Created
January 30, 2014 16:24
-
-
Save stuartphilp/8712421 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
correlator = -> | |
Math.floor (Math.random() * 10000000000000000) | |
module.exports = new class DFP | |
request: ({id, size, targets}, callback) => | |
counter = counter + 1 | |
data = | |
# These field names and values have been determined by reverse engineering | |
# requests made from Google's official GPT library. (The GPT library | |
# cannot be used directly because it places all ad units in iframes.) | |
gdfp_req:1 | |
correlator: correlator() | |
output: "json_html" | |
iu:id | |
sz:size | |
gut:"v2" | |
ifi:counter | |
json_a: 1 | |
url: window.location.href | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment