RE: How to set the language of the campaign to another language

163 views
Skip to first unread message
Message has been deleted

Google Ads API Forum Advisor

unread,
Sep 3, 2021, 6:18:36 AM9/3/21
to climbe...@nifty.com, adwor...@googlegroups.com
Hi Ryo,

Thanks for posting your concern.

I would like to inform you first that I going to delete your initial post as it contains generated logs.

To investigate, could you provide the complete request and response logs with request ID and request header generated on your end?

You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2MlBpO:ref

Google Ads API Forum Advisor

unread,
Sep 9, 2021, 10:49:44 AM9/9/21
to climbe...@nifty.com, adwor...@googlegroups.com
Hi Ryo,

I work with Ernie and will assist you. Thank you for giving us the logs. To set Japanese as the language, you can add to the "Grouped operations" inside 'mutateOperations': [] like this:


{
   'campaignCriterionOperation':{
      'create': {
           'campaign': 'customers/${CUSTOMER_ID}/campaigns/-2',
          'language': {
              'languageConstant': 'languageConstants/1005'
          }
     }
  }
}

I tried it and it worked. Feel free to get back to us.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2MlBpO:ref

simo mazraoui

unread,
Dec 30, 2021, 12:10:29 PM12/30/21
to AdWords API and Google Ads API Forum
Hi,

Please I have a question, how to send the same request, but with multiple Languages, can I do like that: 

{
   'campaignCriterionOperation':[
      'create': {
           'campaign': 'customers/${CUSTOMER_ID}/campaigns/-2',
          'language': {
              'languageConstant': 'languageConstants/1005'
          }
     },
     'create': {
           'campaign': 'customers/${CUSTOMER_ID}/campaigns/-2',
          'language': {
              'languageConstant': 'languageConstants/1006'
          }
     }
  ]
}

Regards,

Google Ads API Forum Advisor

unread,
Dec 30, 2021, 8:11:13 PM12/30/21
to mazrao...@gmail.com, adwor...@googlegroups.com
Hi Simo,

Thank you for raising your follow up question.

I would suggest to follow this format for creating multiple entities in one operation. Let me know if you have questions with the provided sample.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2MlBpO:ref

simo mazraoui

unread,
Dec 31, 2021, 3:34:15 AM12/31/21
to AdWords API and Google Ads API Forum
Hi, 

Thank you for the update.

I already know about this format, but I want to make multiple languages using Grouped operations method

Thank you

Google Ads API Forum Advisor

unread,
Dec 31, 2021, 6:54:22 AM12/31/21
to mazrao...@gmail.com, adwor...@googlegroups.com

Hi Simo,

Thank you for your reply. Yes, you may try using googleAds:mutate method in order to send groups of operations with multiple types of resources. You can send many operations of different types to chain together a sequence of operations that should be carried out as a group. Note that the group of operations will all succeed if no operation fails or all fail if any single operation fails, and only resources that support atomic transactions are included, so this method can't replace all calls to individual services. Let us know how this goes on your end.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2MlBpO:ref

simo mazraoui

unread,
Dec 31, 2021, 9:52:33 AM12/31/21
to AdWords API and Google Ads API Forum
Hi, 

Thank you for the reply.

I follow the docs. but I don't find the solution to set multiple campaignCriterionOperation or set multiple Location in campaignCriterionOperation, 

for example:
 {
"mutateOperations": [
{
"campaignBudgetOperation": {
"create": {
"resourceName": "customers/{{CUSTOMER_ID}}/campaignBudgets/-1",
"name": "My Campaign Budget",
"deliveryMethod": "STANDARD",
"amountMicros": 5000000,
"explicitlyShared": false
}
}
},
{
"campaignOperation": {
"create": {
"resourceName": "customers/{{CUSTOMER_ID}}/campaigns/-2",
"status": "ENABLED",
"advertisingChannelType": "SHOPPING",
"shoppingSetting": {
"merchant_id":"{{MERCHANT_ID}}",
"salesCountry":"MA",
"campaign_priority":2
},
"geoTargetTypeSetting":{
"positiveGeoTargetType": "PRESENCE_OR_INTEREST"
},
"networkSettings": {
"targetGoogleSearch": true,
"targetSearchNetwork": true,
"targetContentNetwork": true,
"targetPartnerSearchNetwork": false
},
"name": "My Stardard Shopping campaign",
"campaignBudget": "customers/{{CUSTOMER_ID}}/campaignBudgets/-1",
"startDate": "2022-11-25",
"endDate": "2022-11-30"
}
}
},
{
"campaignCriterionOperation": {
"create": {
"name": "Campaign Criterion Location",
"campaign":"customers/{{CUSTOMER_ID}}/campaigns/-2",
"location":{
"geoTargetConstant": "2840"
}
}
}
},
{
"adGroupOperation": {
"create": {
"resourceName": "customers/{{CUSTOMER_ID}}/adGroups/-3",
"campaign": "customers/{{CUSTOMER_ID}}/campaigns/-2",
"name": "My Standard ad group",
"status": "ENABLED",
"type": "SHOPPING_PRODUCT_ADS"
}
}
},
{
"adGroupAdOperation": {
"create": {
"adGroup": "customers/{{CUSTOMER_ID}}/adGroups/-3",
"status": "ENABLED",
"ad": {
"name":"My Standard ad",
"shoppingSmartAd":{}
}
}
}
}
]
}

I want to set more than one "Location" in "campaignCriterionOperation", and In documentation there is only object not array to set More than "Location" or "campaignCriterionOperation"

1 - Create campaignCriterionOperation
campaignCriterionOperation.png

2- Create
create.png

3- CampaignCriterion -> Location
location.png

So Please If you can help with that.

Thank you

Google Ads API Forum Advisor

unread,
Jan 3, 2022, 2:56:02 AM1/3/22
to mazrao...@gmail.com, adwor...@googlegroups.com
Hi Simo,

Thank you for your follow up.

Below is an example on how you can include at least 2 create operations when creating your location campaign criteria :

curl -i --request POST "https://googleads.googleapis.com/v9/customers/YOUR_CUSTOMER_ID/campaignCriteria:mutate" \
--header "Content-Type: application/json" \
--header "developer-token: YOUR_DEVELOPER_TOKEN" \
--header "login-customer-id: YOUR_LOGIN_CUSTOMER_ID" \
--header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
--data '{
"operations": [
    {
          "create" : {
          "negative": "false",
          "campaign": "customers/YOUR_CUSTOMER_ID/campaigns/YOUR_CAMPAIGN_ID",
          "location": {
            "geoTargetConstant": "geoTargetConstants/THE_GEO_CONSTANT_1"
          },
         },
    },
    {
          "create" : {
          "negative": "false",
          "campaign": "customers/YOUR_CUSTOMER_ID/campaigns/YOUR_CAMPAIGN_ID",
          "location": {
            "geoTargetConstant": "geoTargetConstants/THE_GEO_CONSTANT_2"
          },
         },
    },
 ]
}'


Let me know if this helps.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2MlBpO:ref

simo mazraoui

unread,
Jan 3, 2022, 6:05:21 AM1/3/22
to AdWords API and Google Ads API Forum
Hi, 

Thank you for the reply.

I know about this solution, but my idea is to set multiple locations like your example but with Grouped operations (googleAds:mutate).

is this possible ??

thank youu 

Google Ads API Forum Advisor

unread,
Jan 3, 2022, 10:51:56 AM1/3/22
to mazrao...@gmail.com, adwor...@googlegroups.com
Hi Simo,

Each mutateOperation has its own enclosure and is added inside the brackets, you can put in multiple campaign criterion without issue. I tested the below sample and it works:
--data '{
    "mutateOperations": [
      {
        "campaignBudgetOperation": {
          "create": {
            "resourceName": "customers/{CID}/campaignBudgets/-1",
            "name": "My Campaign Budget",
            "deliveryMethod": "STANDARD",
            "amountMicros": 5000000,
            "explicitlyShared": false
          }
        }
      },
      {
        "campaignOperation": {
          "create": {
            "resourceName": "customers/{CID}/campaigns/-2",
            "status": "ENABLED",
            "advertisingChannelType": "SEARCH",
             "geoTargetTypeSetting":{
                "positiveGeoTargetType": "PRESENCE_OR_INTEREST"
            },
            "networkSettings": {
                "targetGoogleSearch": true,
                "targetSearchNetwork": true,
                "targetContentNetwork": true,
                "targetPartnerSearchNetwork": false
            },
            "name": "My campaign",
            "campaignBudget": "customers/{CID}/campaignBudgets/-1",
       "manualCpc": {
             "enhancedCpcEnabled": true
         },
            "startDate": "2022-11-25",
            "endDate": "2022-11-30"
          }
        }
      },
      {
        "campaignCriterionOperation": {
          "create": {
            "campaign":"customers/{CID}/campaigns/-2",
            "location":{
                "geoTargetConstant": "geoTargetConstants/9050637"
            }
          }
        }
      },
      {
        "campaignCriterionOperation": {
          "create": {
            "campaign":"customers/{CID}/campaigns/-2",
            "location":{
                "geoTargetConstant": "geoTargetConstants/9050703"
            }
          }
        }
      }
    ],
"responseContentType": "MUTABLE_RESOURCE"
}
'

You can also create many campaigns without issue in the same request, just using a different negative number as temporary resourceName so that criteria for each campaign can be created with campaign creation. Feel free to get back to us.

Regards,
 

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2MlBpO:ref

simo mazraoui

unread,
Jan 3, 2022, 10:59:47 AM1/3/22
to AdWords API and Google Ads API Forum
Got it, Thank you soo much for your help 

Mhmoudahmdmohmmd homydt

unread,
Jan 4, 2022, 6:09:16 PM1/4/22
to ads...@forumsupport.google, climbe...@nifty.com, adwor...@googlegroups.com
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/tYXnk000000000000000000000000000000000000000000000QYUSML00ahi7ZxfjRTCyns0FmKDTPA%40sfdc.net.
Reply all
Reply to author
Forward
0 new messages