Hello Anash, Solved. When i am adding field rejectionReasons to my campaign Service than i am getting desired output. But still dont know why Delivery Method field is depend on rejectionReasons field.
Thanks, chirag On Feb 22, 10:25 am, Chirag <[email protected]> wrote: > Hi Anash, > > Any update why i am not getting DeliveryMethod data? > > Thanks, > Chirag > > On Feb 21, 4:34 pm, Chirag <[email protected]> wrote: > > > > > > > > > Hi Anash, > > I have already defining "DeliveryMethod" as fields,but still getting > > no value for delivery method. > > Please look at my code here that i am using. > > > function GetCampaignsExample(AdWordsUser $user) { > > // Get the service, which loads the required classes. > > $campaignService = $user->GetService('CampaignService', 'v201109'); > > > // Create selector. > > $selector = new Selector(); > > $selector->fields = array('Id', 'Name', 'DeliveryMethod', > > 'AdServingOptimizationStatus', 'TargetGoogleSearch', > > 'TargetContentNetwork'); > > $selector->ordering[] = new OrderBy('Name', 'ASCENDING'); > > > // Create paging controls. > > $selector->paging = new Paging(0, PAGE_SIZE); > > > $statusPredicate = new Predicate('Status', 'IN', array('ACTIVE')); > > $selector->predicates = array($statusPredicate); > > > do { > > // Make the get request. > > $page = $campaignService->get($selector); > > echo "<pre>"; > > print_r($page); > > exit; > > // Display results. > > if (isset($page->entries)) { > > foreach ($page->entries as $campaign) { > > printf("Campaign with name '%s' and id '%s' was found.\n", > > $campaign->name, $campaign->id); > > } > > } else { > > print "No campaigns were found.\n"; > > } > > > // Advance the paging index. > > $selector->paging->startIndex += PAGE_SIZE; > > } while ($page->totalNumEntries > $selector->paging->startIndex); > > > } > > > My Output: > > > CampaignPage Object > > ( > > [totalBudget] => Budget Object > > ( > > [period] => DAILY > > [amount] => Money Object > > ( > > [microAmount] => 0 > > [ComparableValueType] => Money > > [_parameterMap:ComparableValue:private] => Array > > ( > > [ComparableValue.Type] => > > ComparableValueType > > ) > > > ) > > > [deliveryMethod] => > > ) > > > [entries] => Array > > ( > > [0] => Campaign Object > > ( > > [id] => campaignID > > [name] => CampaignName > > [status] => > > [servingStatus] => > > [startDate] => > > [endDate] => > > [budget] => > > [biddingStrategy] => > > [conversionOptimizerEligibility] => > > ConversionOptimizerEligibility Object > > ( > > [eligible] => > > [rejectionReasons] => Array > > ( > > [0] => NOT_CPC_CAMPAIGN > > [1] => CAMPAIGN_IS_NOT_ACTIVE > > [2] => > > CONVERSION_TRACKING_NOT_ENABLED > > ) > > > ) > > > [campaignStats] => CampaignStats Object > > ( > > [startDate] => > > [endDate] => > > [network] => ALL > > [clicks] => > > [impressions] => > > [cost] => > > [averagePosition] => > > [averageCpc] => > > [averageCpm] => > > [ctr] => > > [conversions] => > > [conversionRate] => > > [costPerConversion] => > > [conversionsManyPerClick] => > > [conversionRateManyPerClick] => > > [costPerConversionManyPerClick] => > > [viewThroughConversions] => > > [totalConvValue] => > > [valuePerConv] => > > [valuePerConvManyPerClick] => > > [invalidClicks] => > > [invalidClickRate] => > > [numCalls] => > > [numMissedCalls] => > > [numReceivedCalls] => > > [callDurationSecs] => > > [avgCallDurationSecs] => > > [StatsType] => CampaignStats > > [_parameterMap:Stats:private] => Array > > ( > > [Stats.Type] => StatsType > > ) > > > ) > > > [adServingOptimizationStatus] => OPTIMIZE > > [frequencyCap] => FrequencyCap Object > > ( > > [impressions] => 0 > > [timeUnit] => > > [level] => > > ) > > > [settings] => > > [networkSetting] => NetworkSetting Object > > ( > > [targetGoogleSearch] => 1 > > [targetSearchNetwork] => > > [targetContentNetwork] => > > [targetContentContextual] => > > [targetPartnerSearchNetwork] => > > ) > > > ) > > > ) > > > [totalNumEntries] => 1 > > [PageType] => CampaignPage > > [_parameterMap:Page:private] => Array > > ( > > [Page.Type] => PageType > > ) > > > ) > > > On Feb 21, 3:17 pm, "Anash P. Oommen" <anash.p.oommen > > > [email protected]> wrote: > > > Hi Chirag, > > > > Try mentioning DeliveryMethod as one of the fields in your selector for > > > downloading Campaigns. > > > Seehttp://code.google.com/apis/adwords/docs/reference/latest/CampaignSer... > > > details. > > > > Cheers, > > > Anash P. Oommen, > > > AdWords API Advisor. -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
