Many thanks Dan and Eric, I got it now.

Solution (Displays first page min CPC, stats such as clicks,
impressions, etc and quality score):

        // Create id filter.
        $idFilter = new AdGroupCriterionIdFilter();
        $idFilter->adGroupId = $adGroupId;
        $idFilter->criterionId = $criterionId;
        $idFilter->qualityInfo = $criterionId;
        $idFilter->firstPageCpc = $criterionId;

        // Create selectors
        $selector->idFilters = array($idFilter);
        $selector->QualityInfo = $criterionId;
        $selector->statsSelector->dateRange = new
DateRange('20100310','20100310');

        // Update ad group criteria.
        $page = $adGroupCriteriaService->get($selector);
                if (isset($page->entries)) {
                        foreach ($page->entries as $adGroupCriterion) {
..... etc.....


On Mar 10, 9:39 am, AdWords API Advisor <[email protected]>
wrote:
> Hi Mike,
>
> The hierarchy of objects should be:
>
> AdGroupCriterionSelector
> |_ StatsSelector
>    |_ DateRange
>
> Here is an example:
>
> $selector = new CampaignSelector();
> $selector->statsSelector = new StatsSelector();
> $selector->statsSelector->dateRange = new DateRange('20090101',
> '20090131');
>
> Best,
> - Eric Koleda, AdWords API Team
>
> On Mar 9, 5:06 pm, Mike-Indiana <[email protected]> wrote:
>
> > Hi Eric, could you help me out with the dateRange for stats? This is
> > still pulling all stats, and not the daterange. The log does not even
> > show the daterange, so I know I'm getting this wrong.
>
> > Thanks:
>
> >         $selector->statsSelector = $criterionId;
> >         $selector->statsSelector = new DateRange();
> >         $selector->dateRange->min = '20100308';
> >         $selector->dateRange->max = '20100309';
> >         $selector->stats = $criterionId;

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Have you migrated to v200909 yet?
The v13 sunset is on April 22, 2010.

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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to