hi,
i've tried the same way. Here is how my code looks like:
............
$campaignId = (float) '9158116';
$selector = new Selector();
$selector->fields = array('Id',
'CampaignId','Status','Clicks','Impressions');
$selector->ordering = array(new OrderBy('CampaignId', 'ASCENDING'));
// Create predicates.
$adGroupIdPredicate = new Predicate('CampaignId', 'IN',
array($campaignId));
$daterange=new DateRange();
$today = date("Ymd");
$yesterday =
mktime(0,0,0,date("m"),date("d")-10,date("Y"));
$yesterday = date("Ymd", $yesterday);
$daterange->min=$yesterday;
$daterange->max=$today;
$selector->dateRange=$daterange;
$selector->predicates = array($adGroupIdPredicate);
$page = $adGroupCriterionService->get($selector);
// Display ad group criteria.
if (isset($page->entries))
{
foreach ($page->entries as $adGroupCriterion)
{
//echo "criterion
text".$adGroupCriterion->criterion->text;
echo "status".$adGroupCriterion->userStatus;
echo
"clicks".$adGroupCriterion->stats->clicks;
echo
"impressions".$adGroupCriterion->stats->impressions;
}
}
}
................
............
but i couldn't get the clicks and impressions.Please suggest if there
is any mistake in retrieving data.
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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