Hi Paul, Anything new?

please advise,
Regards Shay.
Smart Media Ltd.


2013/6/10 <adwords-api@googlegroups.com>

> Hi Shay,
>
> My apologies for the delay in response. I'm looking into the requests made
> by your account and the numbers being returned. I'll get back to you as
> soon as I have more information.
>
> Regards,
>
> - Paul, AdWords API Team.
>
>
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
>     http://googleadsdeveloper.blogspot.com/search/label/adwords_api
>     https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> On 06/04/13 07:04:18 s...@smedia.co.il wrote:
>
> some details:
> AdWords API v201302
> Developer token: yxokggajv4gopNWc2Bj4Kw
> Client: *Hopy NIS* ( Client ID: 319-879-8061 )
> Campaign: *template cpm russia* ( ID: 119677335 )
> AdGroup: *special placements combo* ( ID: 5496375735 )
>
> running this simple code:
>
> <?php
>
> require_once 'init.php';
>
> function GetPlacementsEx(AdWordsUser $user, $adGroupId) {
>  $placements = array();
> $adGroupCriterionService = $user->GetService('**AdGroupCriterionService',
> ADWORDS_VERSION);
>  $selector = new Selector();
> $selector->fields = array('PlacementUrl', 'Id', 'Status', 'Impressions');
>  $selector->ordering[] = new OrderBy('Id', 'ASCENDING');
> $selector->predicates[] = new Predicate('AdGroupId', 'IN',
> is_array($adGroupId) ? $adGroupId : array($adGroupId));
>  $selector->predicates[] = new Predicate('CriteriaType', 'IN',
> array('PLACEMENT'));
> $page = $adGroupCriterionService->get(**$selector);
>  if (isset($page->entries))
> foreach ($page->entries as $adGroupCriterion)
> $placements[$adGroupCriterion-**>criterion->id] =
> array($adGroupCriterion->**criterion->url, $adGroupCriterion->userStatus,
> $adGroupCriterion->stats->**impressions);
>  return $placements;
> }
>
> try {
> $user = new AdWordsUser();
> //$user->LogAll();
>  $ag_id = array(5496375735);
> $adGroupCriterion = GetPlacementsEx($user, $ag_id);
> foreach ($adGroupCriterion as $agc_id => $agc_details)
>  printf("\t\tActive placement with URL '%s' and id '%s' was found.
> status:'%s' impr:'%s'\n", $agc_details[0], $agc_id, $agc_details[1],
> $agc_details[2]);
> } catch (Exception $e) {
> printf("An error has occurred: %s\n", $e->getMessage());
> }
>
> ?>
>
> I get 4692 results while google's campaign manager give's me 4706 results
> (lets call it `acceptable loss`).
> And the placements details are very inaccurate. for example:
> placement game01.ru ( 16203767823 ) has 351,678 impressions, and from the
> API I get 1090.
>
> [image: תמונה מוטבעת 1]
>
> this is one example out of *most *of the results.
> Please contact me with a solution.
>
> thanks,
> Shay.
>
>
> 2013/6/3 Paul Matthews (AdWords API Team) <adwordsapiadvisor+paul@**
> google.com>
>
> Hi There,
>
> Is there any chance you could email us an example SOAP Request / Response,
> and what numbers you expect to see in it, so we can investigate this
> further.
>
> Regards,
>
> - Paul, AdWords API Team.
>
> On Thursday, 30 May 2013 10:44:22 UTC-4, sh...@smedia.co.il wrote:
>
> Hi.
>
> I wrote a code to pause all placements that has Ctr less than 2.5% and
> more than 200 impressions.
> The problem is that the data I recieve from the API is by far inacurate (I
> see 100 impressions for a placement with 300000 impressions).
> I made a lot of tests and I came to a conclusion that the problem is not
> on my side.
>
> Code example:
> <?php
>
> require_once 'init.php';
>
> function GetCampaignsEx(AdWordsUser $user) {
> $campaigns = array();
>  $campaignService = $user->GetService('**CampaignSer**vice',
> ADWORDS_VERSION);
> $selector = new Selector();
>  $selector->fields = array('Id', 'Name');
> $selector->ordering[] = new OrderBy('Id', 'ASCENDING');
>  $selector->predicates[] = new Predicate('Name', 'CONTAINS_IGNORE_CASE',
> 'cpm');
> $selector->predicates[] = new Predicate('Status', 'IN', array('ACTIVE'));
>  $page = $campaignService->get($**selecto**r);
> if (isset($page->entries))
>  foreach ($page->entries as $campaign)
> $campaigns[$campaign->id] = $campaign->name;
>  return $campaigns;
> }
>
> function GetAdGroupsEx(AdWordsUser $user, $campaignId) {
>  $adGroups = array();
> $adGroupService = $user->GetService('**AdGroupServ**ice',
> ADWORDS_VERSION);
>  $selector = new Selector();
> $selector->fields = array('Id', 'Name');
>  $selector->ordering[] = new OrderBy('Id', 'ASCENDING');
> $selector->predicates[] = new Predicate('CampaignId', 'IN',
> array($campaignId));
>  $selector->predicates[] = new Predicate('Status', 'IN',
> array('ENABLED'));
> $page = $adGroupService->get($**selector**);
>  foreach ($page->entries as $adGroup)
> $adGroups[$adGroup->id] = $adGroup->name;
>  return $adGroups;
> }
>
> function GetPlacementsEx(AdWordsUser $user, $adGroupId) {
>  $placements = array();
> $adGroupCriterionService = $user->GetService('**AdGroupCrit**erionService',
> ADWORDS_VERSION);
>  $selector = new Selector();
> $dateRange = new DateRange();
>  $selector->fields = array('PlacementUrl', 'Id', 'Status', 'Impressions');
> $selector->ordering[] = new OrderBy('Id', 'ASCENDING');
>  $selector->predicates[] = new Predicate('AdGroupId', 'IN',
> is_array($adGroupId) ? $adGroupId : array($adGroupId));
>  $selector->predicates[] = new Predicate('CriteriaType', 'IN',
> array('PLACEMENT'));
> //$selector->predicates[] = new Predicate('Impressions', 'GREATER_THAN',
> 100);
>  //$selector->predicates[] = new Predicate('Ctr', 'LESS_THAN', 0.025); //
> 2.5%
> //$selector->predicates[] = new Predicate('Status', 'NOT_IN',
> array('PAUSED'));
>  $page = $adGroupCriterionService->get(****$selector);
> if (isset($page->entries))
>  foreach ($page->entries as $adGroupCriterion)
> $placements[$adGroupCriterion-****>criterion->id] =
> array($adGroupCriterion->**crite**rion->url,
> $adGroupCriterion->userStatus, $adGroupCriterion->stats->**impr**essions);
>  return $placements;
> }
>
> function PausePlacementEx(AdWordsUser $user, $adGroupId, $placementId) {
>  $adGroupCriterionService = $user->GetService('**AdGroupCrit**erionService',
> ADWORDS_VERSION);
> $adGroupCriterion = new BiddableAdGroupCriterion();
>  $adGroupCriterion->adGroupId = $adGroupId;
> $adGroupCriterion->criterion = new Criterion($placementId);
>  $adGroupCriterion->userStatus = 'PAUSED';
> $operation = new AdGroupCriterionOperation();
>  $operation->operand = $adGroupCriterion;
> $operation->operator = 'SET';
>  $operations = array($operation);
> try{
> $mutation = $adGroupCriterionService->**muta**te($operations);
>  } catch (SoapFault $fault) {
> return false;
>  }
> return true;
> }
>
> try {
> $user = new AdWordsUser();
> //$user->LogAll();
>  $campaigns = GetCampaignsEx($user);
> foreach ($campaigns as $c_id => $c_name) {
>  printf("Active campaign with name '%s' and id '%s' was found.\n",
> $c_name, $c_id);
> $adGroups = GetAdGroupsEx($user, $c_id);
>  foreach ($adGroups as $ag_id => $ag_name) {
> printf("\tActive adGroup with name '%s' and id '%s' was found.\n",
> $ag_name, $ag_id);
>  $adGroupCriterion = GetPlacementsEx($user, $ag_id);
> foreach ($adGroupCriterion as $agc_id => $agc_url) {
>  printf("\t\tActive placement with URL '%s' and id '%s' was found.
> status: {$agc_url[1]}. impressions: {$agc_url[2]}\n", $agc_url[0], $agc_id);
>  //if (!(PausePlacementEx($user, $ag_id, $agc_id)))
> // print "\t\t\tError: placement pause failed.\n";
>  }
> }
> }
> } catch (Exception $e) {
> printf("An error has occurred: %s\n", $e->getMessage());
> }
> ?>
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to