AdGroup Age_Range Criterion

215 views
Skip to first unread message

Pietro Galassi

unread,
Jan 24, 2020, 5:01:22 AM1/24/20
to AdWords API and Google Ads API Forum
Hi all,

we have created a new criterion using:

{
    "operations": [{
            "create": {
                "ageRange": {
                    "type": "AGE_RANGE_18_24"
                },
                "adGroup": "customers/XXXXXXXXXXXX/adGroups/YYYYYYYYYYY",
                "status": "ENABLED",
                "type": "AGE_RANGE",
                "negative": false
            }

        }
    ]
}

that criterion is created sucessfully but when we check the google ads console we see all the AGE_RANGE active!

Is this a bug ?
How we can set up ONLY one set of AGE_RANGE (example as we did ONLY 18_24) ?

Regards,
Pierpaolo

Google Ads API Forum Advisor Prod

unread,
Jan 24, 2020, 3:14:16 PM1/24/20
to pietro....@gmail.com, adwor...@googlegroups.com

Hello Pietro,

Thank you for reaching out. Although, AgeRange and Gender can be used as targeting criteria on an ad group, I would recommend referring to the Criteria Usage Guide to check if you are allowed to use a particular criteria on your ad group type (search, display etc). A complete list of codes for gender and age range targeting is available on this page. Could you please confirm if you are trying to target the allowed ad group and still observing the same error? If yes, could you please share the complete request and response logs along with the client customer id for me to investigate this further on my end and assist you better?

P.S. Please use Reply privately to author option while sharing the details for investigation.

Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001USwxO0:ref

Pietro Galassi

unread,
Jan 27, 2020, 3:36:25 AM1/27/20
to AdWords API and Google Ads API Forum
Hi,

we are setting the criterion at adgroup level as you can see in the request.
But while we set ONLY one AGE_RANGE let's say 18_24 on the google ads console we see ALL the age range criterion set (all green).
Can you please tell us how it works ?

Regards,
Pierpaolo

Google Ads API Forum Advisor Prod

unread,
Jan 28, 2020, 3:09:42 PM1/28/20
to pietro....@gmail.com, adwor...@googlegroups.com
Hi Pierpaolo,

After you create a campaign and/or ad group, you will see that they already target all the age ranges. If you only want to target one specific range, you will need to exclude the other ranges. Let me know if you still see issues.

Regards,
Anthony

Pietro Galassi

unread,
Jan 30, 2020, 5:52:08 AM1/30/20
to AdWords API and Google Ads API Forum
Hi,

this is what is happening from GUI not from API.

When you create a campaign from APIs the only criterion that are automatically created are the ones related to device.

How to replicate:
1) create a campagn with api 
2) retrieve all criterion related to campaign:
    {
      "query" : "SELECT campaign_criterion.resource_name, campaign_criterion.type FROM campaign_criterion WHERE campaign_criterion.campaign= 'customers/XXXXXXXXXXXXX/campaigns/YYYYYYYYYYYY'"
    }

You will get ONLY criterion related to DEVICE.

So how it works with apis ?

Regards,
Pierpaolo

Pietro Galassi

unread,
Jan 30, 2020, 6:01:20 AM1/30/20
to AdWords API and Google Ads API Forum
As an addendum:

Query to get criterion related to campaign:
{
  "query" : "SELECT campaign_criterion.resource_name, campaign_criterion.type FROM campaign_criterion WHERE campaign_criterion.campaign= 'customers/2017233623/campaigns/9129481874'"
}

Response:
{
    "results": [
        {
            "campaignCriterion": {
                "resourceName": "customers/2017233623/campaignCriteria/9129481874~30000",
                "type": "DEVICE"
            }
        },
        {
            "campaignCriterion": {
                "resourceName": "customers/2017233623/campaignCriteria/9129481874~30001",
                "type": "DEVICE"
            }
        },
        {
            "campaignCriterion": {
                "resourceName": "customers/2017233623/campaignCriteria/9129481874~30002",
                "type": "DEVICE"
            }
        },
        {
            "campaignCriterion": {
                "resourceName": "customers/2017233623/campaignCriteria/9129481874~30004",
                "type": "DEVICE"
            }
        }
    ],
    "totalResultsCount": "4",
    "fieldMask": "campaignCriterion.resourceName,campaignCriterion.type"
}


We also created an AdGroup and getting the related criterion:
{
  "query" : "SELECT ad_group_criterion.resource_name, ad_group_criterion.type FROM ad_group_criterion WHERE ad_group_criterion.ad_group= 'customers/2017233623/adGroups/91125827463'"
}
RESPONSE:
{
    "fieldMask": "adGroupCriterion.resourceName,adGroupCriterion.type"
}

So, no AGE_RANGE criterion are created by default.

Regards,
Pierpaolo


On Tuesday, 28 January 2020 21:09:42 UTC+1, adsapiforumadvisor wrote:

Google Ads API Forum Advisor Prod

unread,
Jan 31, 2020, 11:09:28 AM1/31/20
to pietro....@gmail.com, adwor...@googlegroups.com
Hi Pietro,

I did some testing and analysis and found the following behavior:
1. Create campaign via API

2. Create 2 ad groups via API

3. Run report on ad_group_criterion
-No results from API
-UI shows all age ranges

4. Exclude one age range for one ad group

5. Run report on ad_group_criterion
-All age ranges for this ad group return. Added the field ad_group_criterion.negative in the query.
-Other ad group doesn't return results
Reply all
Reply to author
Forward
0 new messages