Yoda-San
Yoda-San

Reputation: 11

Ad id from Google publisher tag

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

Upvotes: 1

Views: 403

Answers (1)

rabsom
rabsom

Reputation: 859

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()

Upvotes: 0

Related Questions