Hello Team,

Can you please help me in using lhs/rhs operand in matchingfunction in 
order to get details of locationgroup object like income tier etc. Right 
now though we are getting matchingfunction as null.

The response is like this:

    [0] => CampaignCriterion Object
            [campaignId] => 194515594
            [isNegative] => 
            [criterion] => LocationGroups Object
                    [feedId] => 
                    [matchingFunction] => 
                    [id] => 263370580451
                    [type] => LOCATION_GROUPS
                    [CriterionType] => LocationGroups
                    [_parameterMap:Criterion:private] => Array
                            [Criterion.Type] => CriterionType


            [bidModifier] => 
            [baseCampaignId] => 
            [forwardCompatibilityMap] => 
            [CampaignCriterionType] => CampaignCriterion
            [_parameterMap:CampaignCriterion:private] => Array
                    [CampaignCriterion.Type] => CampaignCriterionType


The function is like this:

public function GetCampaignTargetingCriteriaExample(AdWordsUser $user, 
$campaignId) {
                // Get the service, which loads the required classes.
                $campaignCriterionService =
                $user->GetService('CampaignCriterionService', 'v201607');

                // Create selector.
                $selector = new Selector();
                $selector->fields = array('Id', 'CriteriaType');

                // Create predicates.
                $selector->predicates[] =  new Predicate('CampaignId', 'IN', 
                //$selector->predicates[] = new Predicate('CriteriaType', 'IN', 
                $selector->predicates[] = new Predicate('CriteriaType', 'IN',  

                // Create paging controls.
                $selector->paging = new Paging(0, 

                do {
                        // Make the get request.
                        $page = $campaignCriterionService->get($selector);

                        // Display results.
                        if (isset($page->entries)) {
                                return $page->entries;
                          foreach ($page->entries as $campaignCriterion) {
                                printf("Campaign targeting criterion with ID 
'%s' and type '%s' was "
                                        . "found.\n", 
                        } else {
                          print "No campaign targeting criteria were found.\n";

                        // Advance the paging index.
                        $selector->paging->startIndex += 
                } while ($page->totalNumEntries > 

We just trying to find a way to use lhs/rhs operand inb proper way. Please 
help us with php code for this.

Thanks & Regards

Also find us on our blog and Google+:

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
For more options, visit this group at
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to