How to get unique ad id from google analytics api
I'm new to Google Analytics API , there is a way to fetch AdId form this api, Google adwords api provides unique id
each ad.
I was able to extract ga:adwordsCampaignID
and ga:adwordsAdGroupID
from the API Google Analytics. I'm having trouble finding an option for Ad Id
source to share
The ad ID is currently unavailable although the Google Analytics API. Currently only the following is available, you can extract from Google Analytics api:
ga: adGroup ga: adSlot ga: adSlotPosition ga: adDistributionNetwork ga: adMatchType ga: adKeywordMatchType ga: adMatchedQuery ga: adPlacementDomain ga: adPlacementUrl ga: adWordsFormat ga: adTargetOplayTypeUrl adwordsAdGroupID ga: adwordsCreativeID ga: adwordsCriteriaID ga: adQueryWordCount ha: isTrueViewVideoAd
New dimensions and metrics are added from time to time. You can check this page and see if it will be added in the future. Adwords - Sizing & Metrics Help
source to share
In Google Analytics, the size ga:adwordsCreativeID
(API Reference) is equivalent to the AdWords API Ad.id
and will most likely meet your requirements
source to share