TargetingIdeaService return keywords stats not matched with Web UI.

885 views
Skip to first unread message

Chirag eReportz

unread,
Aug 1, 2013, 2:58:51 AM8/1/13
to adwor...@googlegroups.com
Hello,

We have been using the TargetingIdeaService to get New idea of KEYWORD_TEXT ,AVERAGE_CPC , SEARCH_VOLUME for some time 
now but recently we have noticed that the values returing were not expected. For example, for the keywords in $targetingIdeaService = $user->GetService('TargetingIdeaService', '201306'); // Create seed keyword. $keyword = array('in home senior care','senior care services','senior home care','elder home care'...etc); // Create selector. $selector = new TargetingIdeaSelector(); $selector->requestType = 'IDEAS'; $selector->ideaType = 'KEYWORD'; $selector->requestedAttributeTypes = array('KEYWORD_TEXT','COMPETITION','SEARCH_VOLUME','AVERAGE_CPC'); $languageParameter = new LanguageSearchParameter(); $english = new Language(); $english->id = 1000; $languageParameter->languages = array($english); $relatedToQuerySearchParameter = new RelatedToQuerySearchParameter(); $relatedToQuerySearchParameter->queries = $keyword; $selector->searchParameters[] = $relatedToQuerySearchParameter; $selector->searchParameters[] = $languageParameter; $selector->paging = new Paging(0, 500); $page = $targetingIdeaService->get($selector); Result Keywords stats Not match with UI. and Average cpc is also very High. What is the issue??

Danial Klimkin

unread,
Aug 2, 2013, 5:20:37 AM8/2/13
to adwor...@googlegroups.com
Hello Chirag,


The UI number is an average for past several month (see the description under "?" button) while API data is monthly. They can match for some months but likely to be different.


-Danial, AdWords API Team.

Chirag eReportz

unread,
Aug 13, 2013, 6:36:48 AM8/13/13
to adwor...@googlegroups.com
Hello Danial,

Can i get previous month avg cpc using API?
Or any way to get results like older API versions?

Danial Klimkin

unread,
Aug 14, 2013, 4:29:39 AM8/14/13
to adwor...@googlegroups.com
Hello Chirag,


Avg number is not reported by the API but you can calculate it on the client side based on the monthly numbers.


-Danial, AdWords API Team.

Chirag

unread,
Aug 14, 2013, 6:01:55 AM8/14/13
to adwor...@googlegroups.com
Hello,

I had tried to find avg cpc for previous months to get avg cpc, but there is no way to find previous month CPC.
Can you guide me which service metrics i need to use?

Thanks,
chirag

Danial Klimkin

unread,
Aug 15, 2013, 5:14:13 AM8/15/13
to adwor...@googlegroups.com
Hello Chirag,


I am sorry I initially got confused by a different parameter.

I ran a few queries for the keywords you specified in both UI and API and results are matching exactly for me. Are you using the new Keyword Planner?

If so, please make sure you use the same network for the UI ("Google" vs "Google and search partners" on the left).


-Danial, AdWords API Team.

Chirag

unread,
Aug 15, 2013, 2:11:39 PM8/15/13
to adwor...@googlegroups.com
Hello Danial,

I am using same parameter,but i am not getting same result as UI. You can see the diffrence.
                                                         API value                                                                   UI value  
Keyword                               Search volume         AVG CPC (Micro Amount)      Search volume         AVG CPC          
in home senior care     1000                           216846693                         880                         $3.80
senior care services     880                           214674314                         590                        $3.68
senior home care        5400                           251675313                        3600                        $4.25
elder home care                          390                           195457037                          210                        $3.79

Please see my code. Also see the UI Image attached here with.
$targetingIdeaService =
      $user->GetService('TargetingIdeaService', ADWORDS_VERSION);

  // Create seed keyword.
  $keyword = array('in home senior care','senior care services','senior home care','elder home care');

  // Create selector.
  $selector = new TargetingIdeaSelector();
  $selector->requestType = 'STATS';
  $selector->ideaType = 'KEYWORD';
  $selector->requestedAttributeTypes = array('KEYWORD_TEXT', 'SEARCH_VOLUME',
      'CATEGORY_PRODUCTS_AND_SERVICES', 'COMPETITION', 'AVERAGE_CPC', 'TARGETED_MONTHLY_SEARCHES');

  // Create language search parameter (optional).
  // The ID can be found in the documentation:
  // Note: As of v201302, only a single language parameter is allowed.
  $languageParameter = new LanguageSearchParameter();
  $english = new Language();
  $english->id = 1000;
  $languageParameter->languages = array($english);
  
  $locationTargetParameter = new LocationSearchParameter();
  $location = new location();
  $location->id = 2840;
  $locationTargetParameter->locations = $location;
  
  $networkTargetParameter = new NetworkSearchParameter();
  $networksetting = new NetworkSetting();
  $networksetting->SearchParameterType = 'targetGoogleSearch';
  $networkTargetParameter->networkSetting = $networksetting;

  // Create related to query search parameter.
  $relatedToQuerySearchParameter = new RelatedToQuerySearchParameter();
  $relatedToQuerySearchParameter->queries = $keyword;
  $selector->searchParameters[] = $relatedToQuerySearchParameter;
  $selector->searchParameters[] = $languageParameter;
  $selector->searchParameters[] = $locationTargetParameter;
  $selector->searchParameters[] = $networkTargetParameter;

  // Set selector paging (required by this service).
  $selector->paging = new Paging(0, AdWordsConstants::RECOMMENDED_PAGE_SIZE);

  do {
    // Make the get request.
    $page = $targetingIdeaService->get($selector);
    // Display results.
    if (isset($page->entries)) {
      foreach ($page->entries as $targetingIdea) {
        $data = MapUtils::GetMap($targetingIdea->data);
        $keyword = $data['KEYWORD_TEXT']->value;
        $search_volume = isset($data['SEARCH_VOLUME']->value)
            ? $data['SEARCH_VOLUME']->value : 0;
      }
    } else {
      print "No keywords ideas were found.\n";
    }

    // Advance the paging index.
    $selector->paging->startIndex += AdWordsConstants::RECOMMENDED_PAGE_SIZE;
  } while ($page->totalNumEntries > $selector->paging->startIndex);
}
keywords.png

Danial Klimkin

unread,
Aug 16, 2013, 4:42:50 AM8/16/13
to adwor...@googlegroups.com
Hello Chirag,


Please check the UI numbers with "Google and search partners" instead of "Google" option on the left. Do they match in this case?


-Danial, AdWords API Team.

Chirag

unread,
Aug 16, 2013, 6:12:18 AM8/16/13
to adwor...@googlegroups.com
Hello Danial,

Yes after selecting google and search partner i am getting Search volume properly.
But avg CPC data is still not matched. and to find UI data i need option to get data on previous dates.
How i can find avg cpc on previous dates data.

Also one more question.

Using API i am only passing google as targetting than why API is giving me data for Google and search partners?

Thanks,

Danial Klimkin

unread,
Aug 20, 2013, 12:19:29 PM8/20/13
to adwor...@googlegroups.com
Hello Chirag,


Looking on the code below, the network parameter is not specified correctly:

$networkTargetParameter = new NetworkSearchParameter();
  $networksetting = new NetworkSetting();
  $networksetting->SearchParameterType = 'targetGoogleSearch';
  $networkTargetParameter->networkSetting = $networksetting;

Please see the structure here:


You need to provide "true" or "false" values for every option (partner network is optional).

Let us know if the result still differ with the UI when you specify only targetGoogleSearch == true. Please provide exact XML (not PHP) code for the request in this case.


-Danial, AdWords API Team.

Chirag

unread,
Aug 21, 2013, 2:35:05 AM8/21/13
to adwor...@googlegroups.com
Hello Danial,

Thanks for info, Yes this was corrected by me earlier.

My main issue is how i can get previous month / previous date AVG CPC data?
As now adwords api TargetingIdeaService changed from UI of keywords planner tool. And you said earlier that UI is AVG value where in API we found exact value for AVG CPC.

So Please guide me how to get previous dates AVG CPC using adwords api. As i am not finding any date parameter that can be pass using TargetingIdeaService.

Thanks For all Your help.

Chirag

Danial Klimkin

unread,
Aug 21, 2013, 8:30:16 AM8/21/13
to adwor...@googlegroups.com
Hello Chirag,


As I also corrected myself before, this only applies to search volume. Avg CPC values should match exactly.

If you see the difference, please send us exact request, response and the UI screenshot that doesn't match. Please make sure all the parameters are set exactly the same.


-Danial, AdWords API Team.

Chirag

unread,
Aug 22, 2013, 7:19:14 AM8/22/13
to adwor...@googlegroups.com
Hello Danial,

Avg CPC values are not match exactly.
Please see the attached request and responce xml with the UI Screen shot. I am sure that, I have passed other parameters correctly.
request.txt
response.txt
adwords_UI.png

Chirag

unread,
Aug 26, 2013, 2:03:35 AM8/26/13
to adwor...@googlegroups.com
Hi Danial,

Any pdate on this?

Thanks,
chirag

Danial Klimkin

unread,
Aug 28, 2013, 6:22:55 AM8/28/13
to adwor...@googlegroups.com
Hello Chirag,


I am sorry for the delay, I was traveling and had very limited connectivity.

You need to specify all the networkSettings explicitly, setting unwanted to false:
        :network_setting => {
          :target_google_search => true,
          :target_search_network => false,
          :target_content_network => false,
          :target_partner_search_network => false
        }

In this case, the values match for me. Please make sure to re-run the UI query as well as the numbers have changed.


-Danial, AdWords API Team.

Chirag

unread,
Sep 2, 2013, 1:08:04 PM9/2/13
to adwor...@googlegroups.com
Hello Danial,

Thanks for reply.

Yes, Now i am getting peroper CPC. But I had noticed one thing, Now CPC is comes with currency related to Customer ID that is not the case under previous versions.

After changing customer id i am getting proper CPC.

Thanks,
Chirag

tanushree singh

unread,
May 6, 2015, 10:49:49 AM5/6/15
to adwor...@googlegroups.com
Hi Danial
I am curious to know more about AVERAGE_CPC. Is the number reported historical average or is this projection for a random campaign? If it is average, what is the period on which this is averaged AND if this is for all clicks on that query or is it averaged on sampled clicks?
Tanushree

Danial Klimkin

unread,
May 13, 2015, 12:04:01 PM5/13/15
to adwor...@googlegroups.com, singhtan...@gmail.com
Hello Tanushree,


I am closing this thread as it is two years old. Please start a new one with your question.


-Danial, AdWords API Team.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages