Hi Mike,

In order to retrieve stats you need to add an AdStatsSelector object
in your selector, with the date range specified.  This will cause the
API server to return the Stats object with your results automatically.

  
http://code.google.com/apis/adwords/v2009/docs/reference/AdGroupAdService.AdStatsSelector.html

Best,
- Eric Koleda, AdWords API Team

On Feb 23, 12:28 pm, Mike-Indiana <michaelyanda+...@gmail.com> wrote:
> Hi Eric,
>
> Is it possible to generate stats while looping through adGroupAd?
>
> My goal is to retrieve the title, description, landing url and display
> url while showing the CTR.
>
> My code in PHP is the following, however I'm not getting the CTR data:
>
> if (isset($result->entries)) {
>         foreach ($result->entries as $adinfo) {
>         // Get ad info
>         $headline = $adinfo->ad->headline;
>         $description1 = $adinfo->ad->description1;
>         $description2 = $adinfo->ad->description2;
>         $displayUrl = $adinfo->ad->displayUrl;
>         $destinationUrl = $adinfo->ad->url;
>         // Get stats
>         $Stats = new Stats();
>         $Stats->startDate = '20100101';
>         $Stats->endDate = '20110201';
>         $Stats->network = 'ALL';
>         $adCTR = $Stats->ctr

-- 
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-...@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.

Reply via email to