Skip to main content
POST
Set up conversion tracking first. Performance Max uses your conversions to decide where to show ads and how much to bid. Ayrshare does not block a campaign without it, but Google may limit its spend until conversion tracking is set up in your Google Ads account. Ayrshare does not set it up for you. When the account has none, the create response includes a warnings entry saying so.
Create a Google Ads Performance Max campaign in one request. You send text and image URLs; Google mixes them into ads across Search, YouTube, Display, Discover, Gmail and Maps. Ayrshare builds the budget, the campaign, one asset group and all its assets together. If Google refuses any part, nothing is created. The request uses the shared Ad Campaigns shape. Reading and changing a campaign, insights and errors work as on Google Search Campaigns. This page covers what is different.
  • Google ads are turned on per account. Contact us to enable them.
  • New campaigns start paused unless you send status: "active".
  • The budget is per day, in the ad account’s currency, and is never shared with other campaigns.
  • Spend in another currency is converted to USD for billing at that day’s exchange rate from Open Exchange Rates. An account in a currency that cannot be converted answers code: 101 before anything is created.
  • Video is not supported. Google may make videos from your images.

Header Parameters

string
required
A new unique value, such as a UUID, for each new campaign. Repeating a request with the same key returns the first response. When a create fails before Ayrshare sends the campaign to Google (for example, an image that is the wrong size), the key is freed, so you can fix the request and retry with the same key.

Body Parameters

string
required
performanceMax.
object
required
Performance Max takes only these strategies. Any other answers code: 101.
  • maximizeConversions: get the most conversions for the budget.
  • targetCpa with targetCpa: the same, aiming at that cost per conversion.
  • maximizeConversionValue: get the most conversion value for the budget.
  • targetRoas with targetRoas: the same, aiming at that return on ad spend, for example 3.5 for 350%.
boolean
required
Google requires this declaration on every campaign.
string[]
Google location ids, for example 2840 for the United States. Leave it out to target every location.
object
required

Images

Ayrshare downloads each image from its URL and checks it before sending anything to Google:
  • GIF, JPG or PNG, up to 5120 KB each.
  • At least the minimum size above, with the aspect ratio of its field (within 1%).
  • All images together up to 45 MB.
  • The URL must be public. Private addresses are refused.
An image that fails answers code: 101 naming it, for example platformOptions.google.assets.logos[0]: the image is 100x100; use at least 128x128.