Optimize your PMax Campaign Results with Google Ads Scripts
Google pMax Campaigns

Optimize your PMax Campaign Results with Google Ads Scripts

Navigating through the realm of Google advertisements can be challenging, yet rewarding.

Even advertisers employing Performance Max (PMax) for automatic campaign creation may want to retain a degree of control over various campaign elements.

That's where the magic of Google Ads Scripts enters.

On September 13, 2022, Google announced its much-awaited support for PMax campaigns via Ads Scripts.

Whether it's about pausing a running campaign or changing asset types in groups, Ads Scripts let advertisers have a firm grip on campaign operations.

Let's dive deep into how Google Ads Scripts can turn around the game for your PMax campaigns.

Effective Google Ads Scripts for PMax Campaigns

Using Google Ads Scripts can bring a significant intervention in how you manage PMax campaigns.

Let's explore some scripts and their functions:

 
Retrieve all performance max campaigns:

function getAllPerformanceMaxCampaigns() {
  const performanceMaxCampaignIterator = AdsApp.performanceMaxCampaigns().get();
  console.log(`Total campaigns found : ${performanceMaxCampaignIterator.totalNumEntities()}`);
  return performanceMaxCampaignIterator;
}
        

This script enlists all your PMax campaigns, leveraging the AdsApp.performanceMaxCampaigns() function.

It then logs the total number of campaigns found and returns the iterator.

Retrieve a Performance Max Campaign by Its Name

The 'getPerformanceMaxCampaignByName()' function filters campaigns by a specific name and returns matching results.

If the campaign isn’t located, the script logs an error message.

On locating a campaign, the script logs details, such as name, bidding strategy, start-end dates, etc. It also returns the PMax campaign object.

Pause a Performance Max Campaign

This script specifically pauses a PMax campaign in Google Ads by name.

The 'pausePerformanceMaxCampaign()' function filters the campaigns and returns the one matching the specified name.

If a match is found, the campaign is paused using the pause() function. If not found, the script continues running as usual.

Retrieve an Asset Group by Its Name

This script retrieves an asset group from a PMax campaign using the name parameters of both assets.

The getAssetGroupByName() function retrieves the specified PMax campaign first, then uses the assetGroups().withCondition() method to extract the specified asset group.

Remove a Specific Video from an Asset Group

This script removes a video from an asset group in a Google Ads PMax campaign. It calls the getVideoByYouTubeId function, which fetches the video asset object associated with the specified YouTube video ID.

Then, it calls the getAssetGroupByName function to fetch the asset group object before finally removing it from the campaign assets.

While Google Ads Scripts can expedite your campaign management effectively, the process can be daunting if you don't have a developer on your team.

In that case, consider reaching out to us ShootOrder? - Digital Marketing Agency — we specialize in setting up and maintaining Google Ads Scripts.

We can guide you through the automation process in Google Ads, helping to optimize your campaigns and get you the best returns.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了