Comments (4)
Simple answer, no.
Although, binding to "gpt-slot_rendered" you can gain access to the iframes that are rendered as a result.
googletag.cmd.push(function () {
googletag.on("gpt-slot_rendered", function (e, level, message, service, slot, reference) {
var $slot = $('#' + slot.getSlotId().getDomId());
var $adFrame = $slot.find("iframe:not([id*=hidden])");
var adDoc = $adFrame.get(0).contentDocument;
var $image_ad = $("body", adDoc).find('#google_image_div');
if($image_ad.length == 0)
return;
var image_ad_href = $image_ad.find('a').map(function () { return this.href.match(/adurl=([^&"]+)/i)[1] }).get(0);
var image_ad_src = $image_ad.find('img').map(function () { return this.src }).get(0);
/*
process image_ad_href or image_ad_src as you will
*/
});
});
Here I've dug up image creatives. While there is no reference to the name of the line-item or creative that's entered in DFP, the click-url and image are available. I imagine something similar could be done for flash ads.
from dfp-events.
Thank you for the quick response! Thats very helpful, I all but gave up. Having an image is not as good as creative line-item name but its some thing. While for flash creatives I only get generic wrapper:
<!-- Copyright 2008 DoubleClick, a division of Google Inc. All rights reserved. -->
<!-- Code auto-generated on Mon Jun 24 11:13:50 EDT 2013 -->
<script src="http://s0.2mdn.net/879366/flashwrite_1_2.js"></script>
Do you think there is some thing similar that can be done to flash ads?
from dfp-events.
Correction, looks like if i wait for a second after getting the gpt-slot_rendered, the flash ad slot fills up with all kinds of useful info including the creative name. Thanks! I think i can use this.
from dfp-events.
for future googlers: https://developers.google.com/doubleclick-gpt/reference#googletagservice
from dfp-events.
Related Issues (12)
- Licensing HOT 1
- Ads rendering response time similar to ?googfc HOT 4
- [REQUEST] publish to npm
- Event ImpressionViewable
- [DO NOT USE] Library will no longer work after Jan 21, 2019 HOT 1
- why are not all the tags firing up at gpt-slot_rendering HOT 1
- Error message.search is not a function HOT 17
- Excellent work! HOT 1
- Events not firing on Chrome and IE HOT 1
- Logging doesn't seem to work in <= IE8 HOT 2
- Incorrect logical operator in debug_log.log line 113 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dfp-events.