Ad id from Google publisher tag

270 Views Asked by At

Is there anyway to find the id of an ad that has served from GPT? The ad response contains creativeId, campaignId, etc. but I couldn't find anything related to the ad id

I tried reading the docs and ad manager help center issues but I couldn't find any answers

1

There are 1 best solutions below

1
On

Using the googletag.pubads() object, you can retrieve the following informations for each defined slots :

  • advertiserId
  • campaignId
  • companyId
  • creativeId
  • creativeTemplateId
  • isBackfill
  • lineitemId
  • sourceAgnosticCreativeId
  • sourceAgnosticLineItemId
  • encryptedTroubleshootingInfo

See here for details. To retrieve data from your first adslot in the page :

googletag.pubads().getSlots()[0].getResponseInformation()