Google AdWords API – Part 3

11 Responses

  1. Michel FLEITH says:

    Thank you for this example, unfortunately i’ve tested and adwords return me :

    an error has occurred: [SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:’AverageCpc’, SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:’AveragePosition’, SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:’Clicks’, SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:’Conversions’, SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:’Cost’, SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:’Ctr’, SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:’Impressions’]

    I don’t know why, and you ?

    • Hello!
      INVALID_FIELD_NAME occurs if the given field does not exist in the current used Adwords API version. You can find a list of all possible fields for each service under this link: Google Adwords API. It depends on which API version you are using. In the current version, AverageCpc is not a valid field for AdGroupAdService, so please fill in correct field names at $selector->fields = array()! Hope this helps 😉

  2. José says:

    Hi, what is $adGroupId? And, where I get it?

    • This article shows you for example how the get TextAds with “function GetTextAds”. On of its params is adGroupId. You can get an adGroupId the same way as TextAds. For this you need campaignId which you can also get the same way. In Part 2 of my article series I describe this steps in detail!

  3. Kurian says:

    I was trying to use this code. But looks likes the api has changed. Can you please tell me how can i get the data available in “GetKeywords”. I am looking for ‘Clicks’, ‘Conversions’, ‘Cost’, ‘Ctr’, ‘Impressions’ for the keywords

    Will you be able to help

    • The API is highly dynamic and Google changes things every 6 months or so…my last status was, that you have to use reports. This is the last working source I have

      hope this helps!

  4. Vikrant says:

    i have a client library in of v201502 and i want to fecth all the clicks,item-id,impressions,cost,conversion of all the campaigns within a given date range from the google adword api.please help me its too urgent.if anyone has any example its better.thanks in advance

    • KEYWORDS_PERFORMANCE_REPORT? See my comment above

      • Vikrant says:

        Thanks for the help Werner but now client want to fetch all this using google analytics api.Actually i already fetch data from this but i am not able to fetch a single campaign data from analytics api like(Shopping item id,clicks,cost,conversion etc.). if you know about this please help me.

Leave a Reply

Your email address will not be published. Required fields are marked *