Hi Anash I have the same issue and posted a request, but didn't get any response.
I carefully reviewed the link you posted, it seems that it just returns group id and type , as it is mentioned here . $adGroupCriterion->adGroupId . '", criterion id "' . $adGroupCriterion->criterion->id . ', and type "' . $adGroupCriterion->criterion->CriterionType . "\" was found.\n"; but no function to give us the keyword, Any help is appreciated Regards On Wed, Oct 20, 2010 at 5:20 AM, AdWords API Advisor < adwordsapiadvi...@google.com> wrote: > Hi Peter, > > You can refer to the following links to see how adgroups and adgroup > criteria can be retrieved. > > > http://code.google.com/p/google-api-adwords-php/source/browse/trunk/examples/v201008/GetAllAdGroups.php > > http://code.google.com/p/google-api-adwords-php/source/browse/trunk/examples/v201008/GetAllAdGroupCriteria.php > > The examples\ folder under the PHP client library should have more > code examples that cover common tasks in AdWords API. > > Cheers, > Anash P. Oommen, > AdWords API Advisor. > > On Oct 19, 3:37 pm, Peter Trobec <ptro...@gmail.com> wrote: > > Hello guys and girls! > > > > I'm a newbie at the whole API thing and I'm a bit stuck at the part > > where I should retreive the keywords or adgroups for the > > campaignStats. > > > > Here is the code: > > > > $zacDat1 = $_POST['zacDat']; > > $koncDat1 = $_POST['koncDat']; > > > > $zacDat = str_replace("/", "", $zacDat1); > > $koncDat = str_replace("/", "", $koncDat1); > > > > //echo $zacDat . " in " . $koncDat; > > > > try { > > // Get AdWordsUser from credentials in "../auth.ini" > > // relative to the AdWordsUser.php file's directory. > > $user = new AdWordsUser(); > > > > // Log SOAP XML request and response. > > $user->LogDefaults(); > > > > $campaignService = $user->GetCampaignService('v200909'); > > $today = date('Y-m-d'); > > > > $start_date = $zacDat; > > $end_date = $koncDat; > > > > $selector = new CampaignSelector(); > > $selector->ids = array($campaignId); > > $page = $campaignService->get($selector); > > > > $statsSelector = new StatsSelector(); > > $dateRange = new DateRange(); > > $dateRange->min = $start_date; > > $dateRange->max = $end_date; > > $statsSelector->dateRange = $dateRange; > > $selector->statsSelector = $statsSelector; > > > > $page = $campaignService->get($selector); > > > > if (isset($page->entries)) { > > foreach ($page->entries as $campaign) { > > echo 'Campaign ID:' . $campaign->id . ' Campaign name:' . > > $campaign->name .' Campaign startdate:"' . $campaign- > > > > >startDate."<br>"; > > > > echo 'Campaign Clicks:' . $campaign->stats->clicks ."<br>"; // > > this is empty at present > > //echo 'Campaign Keywords:' . $campaign->stats-> ."<br>"; ??? > > echo 'Campaign Impressions:' . > $campaign->stats->impressions ."<br>"; //this is empty at present > > > > echo 'Campaign CTR:' . (($campaign->stats- > > > > >ctr)*100) ."%<br><br>"; //this is empty at present > > } > > } > > > > I get the clicks, the impressions, ctr, everything, but I don't know > > how to get also the adgroups or keywords. > > > > Hope you can point me in the right direction or give me some code > > examples. ;) > > > > Thanks! > > -- > =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ > Also find us on our blog and discussion group: > http://adwordsapi.blogspot.com > http://groups.google.com/group/adwords-api > =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ > > You received this message because you are subscribed to the Google > Groups "AdWords API Forum" group. > To post to this group, send email to adwords-api@googlegroups.com > To unsubscribe from this group, send email to > adwords-api+unsubscr...@googlegroups.com<adwords-api%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/adwords-api?hl=en > -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en