Hi,

Thanks for your reply. Basically, I want to get statistics for example for 

New York = clicks, cost, conversions, etc
Canada = clicks, cost, conversions, etc
Alabama = clicks, cost, conversions, etc
Alaska = clicks, cost, conversions, etc

What I have so far is this:

                $campaignService = $adWordsServices->get($session, 
CampaignService::class);

                $selector = new Selector();
                $selector->setFields(array('Id', 'Name', 'Status'));
                $selector->setOrdering(array(new OrderBy('Name', 
'ASCENDING')));

That's for getting the campaign. 

 $campaignId = $campaign->getId();
                            $campaignCriterionService = 
$adWordsServices->get($session, CampaignCriterionService::class);

                            $selector = new Selector();
                            $selector->setFields(['Id', 'CriteriaType', 
'CampaignId','BidModifier', 'LocationName']);
                            $selector->setPredicates([
                              new Predicate('CampaignId', 
PredicateOperator::IN, [$campaignId]), 
                              new Predicate('CriteriaType', 
PredicateOperator::IN, ['LOCATION'])]);

                           $page = 
$campaignCriterionService->get($selector);

That's for getting location.

I used what you suggested CAMPAIGN_LOCATION_TARGET_REPORT:

$query = 'SELECT CampaignId,Clicks, Cost, Conversions, CostPerConversion, 
Ctr,CampaignName,ConversionRate, BidModifier
              FROM CAMPAIGN_LOCATION_TARGET_REPORT
              WHERE CampaignId = ' . $campaignId 

But I'm getting duplicate values. I'm confused on how to get stats for 
exact location. 


On Friday, June 23, 2017 at 5:17:50 AM UTC+8, Shwetha Vastrad (AdWords API 
Team) wrote:
>
> Hi, 
>
> In AdWords API, you need to download a report to get the performance data 
> of your account. You can use the following report types to get geo 
> performance data:
>
>    - Geo Performance report 
>    <https://developers.google.com/adwords/api/docs/appendix/reports#geo>.
>    - Criteria Performance report 
>    
> <https://developers.google.com/adwords/api/docs/appendix/reports/criteria-performance-report>,
>  
>    filtering by CriteriaType=LOCATION or PROXIMITY to get performance data 
> for 
>    a particular geo target.
>    - Campaign Location Target Report 
>    
> <https://developers.google.com/adwords/api/docs/appendix/reports/campaign-location-target-report>
>
> Please see the location targeting guide 
> <https://developers.google.com/adwords/api/docs/guides/location-targeting>
>  and reporting basics guide 
> <https://developers.google.com/adwords/api/docs/guides/reporting> for 
> more details. You can follow this guide 
> <https://github.com/googleads/googleads-php-lib#getting-started> to get 
> started with the AdWords API PHP client library.
>
> Regards,
> Shwetha, AdWords API Team.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
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 [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/53edf584-1380-446d-8394-454715b7ed03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to