AdvertisingChannelSubType not retrieved

瀏覽次數:18 次
跳到第一則未讀訊息

Biniam Asnake

未讀,
2018年3月7日 清晨5:42:042018/3/7
收件者:AdWords API Forum
I am using the Python library and I want to retrieve campaigns with 'AdvertisingChannelType' and 'AdvertisingChannelSubType'.

But, it is not returned from google Adwords and 'budget' is returned even though I didn't request to get it.

Can you please tell me what the solution is?

# Initialize appropriate service.
campaign_service = adwords_client.GetService('CampaignService', version='v201802')

# Construct query and get all campaigns.
query = (adwords.ServiceQueryBuilder()
         
.Select('Id', 'Name', 'Status', 'AdvertisingChannelType', 'AdvertisingChannelSubType')
         
.OrderBy('Name')
         
.Limit(0, PAGE_SIZE)
         
.Build())

for page in query.Pager(campaign_service):
   
if 'entries' in page:
       
for campaign in page['entries']:
           
print(campaign)

Result:
(Campaign){
   id = 12345665
   name = "CampaignName"
   status = "ENABLED"
   budget = ""
   advertisingChannelType = "SEARCH"
 }



Dhanya Sundararaju (AdWords API Team)

未讀,
2018年3月7日 下午1:27:522018/3/7
收件者:AdWords API Forum
Hi Biniam,

You will be able to display the data that you want by specifying the selector fields in just the response. Sample code is available in this section of the guide. Please let me know if you have further questions. 

Regards,
Dhanya, AdWords API Team
回覆所有人
回覆作者
轉寄
0 則新訊息