Is It Possible to Control App Campaigns with Google Ads API?

89 views
Skip to first unread message

kohei

unread,
Nov 8, 2024, 4:01:22 AM11/8/24
to Google Ads API and AdWords API Forum

Hello,

I have been using Google Apps Script to retrieve metrics from App Campaigns using GAQL, which has worked well for me so far. However, I now want to implement additional features, such as pausing, resuming, or renaming App Campaigns based on the budget status.

Since it seems that Google Apps Script does not provide functionality for managing App Campaigns directly, I am considering using the Google Ads API instead.

My question is: Does the Google Ads API support the following operations for App Campaigns?

  1. Retrieving the current status of an App Campaign (e.g., enabled, paused)
  2. Pausing and resuming an App Campaign
  3. Renaming an App Campaign

I have reviewed the documentation, but it was unclear whether these actions are supported for App Campaigns, so I wanted to ask here for clarification. If this question is not appropriate for this forum, I apologize in advance.

I appreciate your help and look forward to your response.

Thank you.

Google Ads API Forum Advisor

unread,
Nov 8, 2024, 8:15:21 AM11/8/24
to kohei....@link-u.co.jp, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Please find the following answers to your questions:


Does the Google Ads API support the following operations for App Campaigns?

Yes, the Google Ads API supports the below operations. 

1) Retrieving the current status of an App Campaign (e.g., enabled, paused)

To fetch the app campaign's current status, try the following GAQL query:
SELECT campaign.id, campaign.name, campaign.resource_name, campaign.status, 
campaign.advertising_channel_type, campaign.advertising_channel_sub_type 
FROM campaign 
WHERE campaign.advertising_channel_sub_type = 'APP_CAMPAIGN'
Additionally, you can utilize the Query Builder and Query Validator to build and validate your queries. To retrieve Google Ads API entities and reporting data, you can use one of these Rest Interface methods like GoogleAdsService.Search or GoogleAdsService.SearchStream.

2) Pausing and resuming an App Campaign 
  • You may check the below sample request body to create a new campaign pause or enable an app campaign : 
{
  "operations": [
    {
      "create": {
        "name": "Test_app_campaign",
        "advertisingChannelType": "MULTI_CHANNEL",
        "advertisingChannelSubType": "APP_CAMPAIGN",
        "campaignBudget": "customers/{customer_id}/campaignBudgets/{campaign_budget_id}",
        "status": "ENABLED",
        "startDate": "2024-11-09",
        "endDate": "2025-02-26",
        "targetCpa": {
          "targetCpaMicros": 1000000
        },
        "appCampaignSetting": {
          "appId": "com.google.android.apps.adwords",
          "appStore": "GOOGLE_APP_STORE",
          "biddingStrategyGoalType": "OPTIMIZE_INSTALLS_TARGET_INSTALL_COST"
        }
      }
    }
  ],
  "partialFailure": true
}
  • The below sample request body is to enable and pause an existing campaign (update operation):
{
  "operations": [
    {
      "update": {
        "resourceName": "customers/{customer_id}/campaigns/{campaign_id}",
        "status": "PAUSED"
      },
      "updateMask": "status"
    }
  ],
  "partialFailure": true
}
In the above requests, you may change the campaign status to ENABLED, PAUSED or REMOVED based on your requirement. 

3) Renaming an App Campaign

Refer the below sample request body to rename the existing app campaign : 
{
  "operations": [
    {
      "update": {
        "resourceName": "customers/{customer_id}/campaigns/{camapign_id}",
        "name": "my_app_campaign"
      },
      "updateMask": "name"
    }
  ],
  "partialFailure": true
}
You can perform above create and update operations on campaigns using the customers.campaigns.mutate rest interface method. Also, you may refer to the app campaigns document for more details. Also, you may follow this sample code to create a new app campaign using client libraries like Java, Python, C# etc. 

I hope this helps! Let us know if you have any further questions.  
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGind:ref" (ADR-00274807)

Thanks,
 
Google Logo Google Ads API Team


Jyotika Saiba

unread,
Dec 6, 2024, 9:25:03 AM12/6/24
to kohei....@link-u.co.jp, Google Ads API and AdWords API Forum
Hhhh

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 "Google Ads API and AdWords 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 visit https://groups.google.com/d/msgid/adwords-api/f05e4841-dd9b-4eb4-9117-2a539779370an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages