You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
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])");varadDoc=$adFrame.get(0).contentDocument;var$image_ad=$("body",adDoc).find('#google_image_div');if($image_ad.length==0)return;varimage_ad_href=$image_ad.find('a').map(function(){returnthis.href.match(/adurl=([^&"]+)/i)[1]}).get(0);varimage_ad_src=$image_ad.find('img').map(function(){returnthis.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.
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?
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.
Such as "SummerPromo_Midscale_160x600_stdfla_20130508.swf". No the slot name but the name of the ad creative that might appear in the slot?
The text was updated successfully, but these errors were encountered: