Update campaign conversion goals
Sets biddable on campaign goals, switches goalConfigLevel, and/or points the
campaign at a custom conversion goal, in one mutate. customConversionGoalId: null
clears it; Google refuses that (400) while the campaign stays at CAMPAIGN level with
no biddable goals, so send goalConfigLevel: CUSTOMER with it to fall back to the
account goals. Returns the re-read campaign goals.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Google campaign id
^\d+$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= propertiesResponse Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adcampaigns.updateCampaignConversionGoals({ path: { campaignId: 'campaign_abc123', }, body: { goals: [ { category: 'string', origin: 'string', biddable: false, }, ], goalConfigLevel: 'CUSTOMER', customConversionGoalId: {}, },});console.log(data);{ "campaignId": "string", "goalConfigLevel": "CUSTOMER", "customConversionGoalId": "string", "goals": [ { "category": "string", "origin": "string", "biddable": true, "resourceName": "string" } ], "customerId": "string"}Get campaign conversion goals
A Google campaign's conversion goals (CampaignConversionGoal, `biddable` per category and origin) and its goal config (ConversionGoalCampaignConfig): `goalConfigLevel` CUSTOMER means the campaign follows the account-default goals, CAMPAIGN means it uses its own goals or `customConversionGoalId`.
List Performance Max asset groups
Read Performance Max asset groups and their linked text, image and YouTube assets. campaignId is the platform campaign id returned by creation or the campaign list. The campaign must be visible to the caller. Uses a 10-minute cache, with the last successful response served as stale when Google quota is exhausted. Removed groups and asset links are excluded. Campaign-level brand assets on campaigns with brand guidelines enabled are not included.