Assets

Before you create a Search campaign, you can prepare text assets you plan to use in your ads. You can also create them as part of campaign creation or even come back and add assets later, but you need a set of assets to create ads.

Check out the Responsive Search Ad asset best practices guide while planning your campaign.

No matter what type of asset you're making, use AssetOperation to create it.

Assets can be created using AdsApp without using mutate, but for the sake of consistency, this guide does it the same way as all the rest of the operations. Note that you can and should reuse existing assets if you already have some available. So while it's required that you have assets to create a Search campaign, it might not be strictly required that you create them as part of the campaign creation process.

Text assets

Text assets work just like any other operation. If you're uploading assets as part of the campaign creation process, use a temporary ID. Otherwise, make a note of the returned resource name to use in a future operation when you need to reference the asset to add it to an ad group or ad.

const textAsset = {
  "assetOperation": {
    "create": {
      "resourceName": `customers/${customerId}/assets/${getNextTempId()}`,
      "name": "Headline Asset 1",
      "type": "TEXT",
      "textAsset": {
        "text": "My headline"
      }
    }
  }
}
operations.push(textAsset);