Performance Max campaigns

2,547 views
Skip to first unread message

Ігор Shop-bbq

unread,
Dec 3, 2021, 11:24:08 AM12/3/21
to Google Ads Scripts Forum
Hi!

I am using script Account Summary Report to get statistics of all campaigns every day in my google sheet. But Performance Max campaigns information is not included yet for some reasons.
 
Can I add some options to the script to get values of all campaigns including Performance Max?

Google Ads Scripts Forum Advisor

unread,
Dec 6, 2021, 2:51:05 AM12/6/21
to adwords...@googlegroups.com
Hello,

Thank you for reaching out to us.

With regard to your concern, I'm afraid that Performance Max campaigns are currently not supported through the Campaign Performance Report from the AdWords API but data in this regard should be retrievable by pulling the campaign view report from the Google Ads API as discussed in this guide. You should be able to use the Google Ads Query Language to pull the report mentioned in the Export Google Ads Reports into BigQuery solution script and retrieve performance max campaigns data.

Regards,
Google Logo
Teejay Wennie Pimentel
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

DB

unread,
Dec 6, 2021, 3:05:01 PM12/6/21
to Google Ads Scripts Forum
Hi guys

I am trying to pull PMAX campaigns data using the new Beta Google ads Script as follow, but not getting any results for PMAX campaigns, is it not supported or am I missing anything?

example code I am trying out:

const query =  
 `SELECT campaign.id, campaign.name, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.conversions, customer.currency_code, campaign.status, campaign.serving_status, metrics.ctr, metrics.average_cpc, campaign.campaign_budget, bidding_strategy.type, campaign.advertising_channel_type, campaign.labels, metrics.all_conversions_from_interactions_rate, campaign.start_date
 FROM campaign
 WHERE 
      segments.date BETWEEN "2021-12-01" AND "2021-12-06"`

const search = AdsApp.search(query)
  
while (search.hasNext()) {
    const row = search.next();
    console.log(JSON.stringify(row))
}

Google Ads Scripts Forum Advisor

unread,
Dec 7, 2021, 12:52:47 AM12/7/21
to adwords...@googlegroups.com
Hello,

You may want to check this guide which contains information on how to retrieve attributes and performance metrics for Performance Max campaigns.

DB

unread,
Dec 7, 2021, 6:42:32 AM12/7/21
to Google Ads Scripts Forum
Trying out the example in the link, Getting empty results on this, what am I missing?

    query =   
 `SELECT
  campaign.url_expansion_opt_out,
  campaign.status,
  campaign.bidding_strategy_type
FROM campaign
WHERE campaign.advertising_channel_type = PERFORMANCE_MAX`
    
const search = AdsApp.search(query)
  
while (search.hasNext()) {
    const row = search.next();
    console.log(JSON.stringify(row))
}
  

Google Ads Scripts Forum Advisor

unread,
Dec 8, 2021, 10:32:57 PM12/8/21
to adwords...@googlegroups.com
Hi DB,

Thanks for coming back. Harry here, I work with Teejay.

Kindly provide your Google Ads account ID, script's name and a shareable link to your spreadsheet if available so I can take a look closer at the issue you are encountering. You may send the spreadsheet privately via the reply to author option.

Looking forward to your reply.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

David Baruch

unread,
Dec 9, 2021, 1:35:07 AM12/9/21
to Google Ads Scripts Forum on behalf of adsscripts
Hi Harry

Thanks for reaching out,

Account id : 169-189-4666
script name : temp_beta_d

Best and looking forward,
D

On Thu, Dec 9, 2021 at 5:32 AM Google Ads Scripts Forum on behalf of
adsscripts <adwords...@googlegroups.com> wrote:
>
> Hi DB,
>
> Thanks for coming back. Harry here, I work with Teejay.
>
> Kindly provide your Google Ads account ID, script's name and a shareable link to your spreadsheet if available so I can take a look closer at the issue you are encountering. You may send the spreadsheet privately via the reply to author option.
>
> Looking forward to your reply.
>
> Thanks,
> Harry Cliford Rivera
> Google Ads Scripts Team
>
>
>
> ref:_00D1U1174p._5004Q2SbQHR:ref
>
> --
> -- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
> ---
> You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/p2f4V68lqD8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/ksWRv000000000000000000000000000000000000000000000R3TWIS00v---xE0JQQq5EJlcalfhXg%40sfdc.net.

Google Ads Scripts Forum Advisor

unread,
Dec 9, 2021, 4:16:19 AM12/9/21
to adwords...@googlegroups.com
Hi D,

Thanks for providing your information. However, I was able to retrieve performance max campaign data using the script below. Would you be able to use the same and let me know if you are still unable to retrieve the expected data? I believe the issue is with the segments.date having an invalid format; you should follow the yyyy-MM-dd format, e.g., 2018-04-17 instead.
  let reportDateFormatted = "2021-12-04"
  var query = "SELECT campaign.id, campaign.name, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.conversions, customer.currency_code, campaign.status, campaign.serving_status, metrics.ctr, metrics.average_cpc, "
            + "campaign.campaign_budget, bidding_strategy.type, campaign.advertising_channel_type, campaign.labels, metrics.all_conversions_from_interactions_rate, campaign.start_date FROM campaign "
            + "WHERE campaign.advertising_channel_type = PERFORMANCE_MAX "
            + `AND segments.date BETWEEN '${reportDateFormatted}' AND '${reportDateFormatted}' `
            + "AND campaign.id = 14803357171";
  console.log(query);
  
  var result = AdsApp.search(query);
  while (result.hasNext()) {
    var row = result.next();
    console.log(JSON.stringify(row));
  }
Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

David Baruch

unread,
Dec 9, 2021, 5:01:31 AM12/9/21
to Google Ads Scripts Forum on behalf of adsscripts
Hi Harry

I just updated my script to run the code sample you provided, getting no results...

Any idea?

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/p2f4V68lqD8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.

Google Ads Scripts Forum Advisor

unread,
Dec 9, 2021, 11:18:12 PM12/9/21
to adwords...@googlegroups.com
Hi D,

Thanks for coming back. I just used the same script that you have currently and can see that it did logged data from the performance max campaign with resource name: customers/1691894666/campaigns/14803357171. I would recommend creating a new script instead using the code below which should work with the current scripts version or scripts beta otherwise, please do let me know if the issue persists on your end.

David Baruch

unread,
Dec 9, 2021, 11:58:04 PM12/9/21
to Google Ads Scripts Forum on behalf of adsscripts
Hi Harry

So I created a new script "temp_beta_d2" with the code sample you provided,
Same thing here getting NO campaign results printed (run on preview and normal run)

Please advice,

Best
D

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/p2f4V68lqD8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.

Google Ads Scripts Forum Advisor

unread,
Dec 10, 2021, 4:11:16 AM12/10/21
to adwords...@googlegroups.com
Hello D,

Thanks for trying that out. I am unable to check for any obvious reasons why would the results on your end would differ from mine. Would you be able to provide screenshots where you are getting no data from the script I provided so I can have the rest of the team further investigate? Also, would you be able to ask a colleague of yours that has admin access to your account to run the script and see if they would also encounter the same issue?


Looking forward to your reply.

David Baruch

unread,
Dec 10, 2021, 5:38:20 AM12/10/21
to Google Ads Scripts Forum on behalf of adsscripts
Would you mind providing a POC email to send the screenshots to?
As for admin, its an issue on this account, can try it out on a different one...

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/p2f4V68lqD8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.

David Baruch

unread,
Dec 12, 2021, 2:30:12 AM12/12/21
to Google Ads Scripts Forum on behalf of adsscripts
Hi Harry 

Here is another account, in which I am Admin, getting the same results.

test_beta_d

I'll be happy to jump on call, having a frontal video meeting trying to resolve this issue,

PLMK,

Best,
DB

Google Ads Scripts Forum Advisor

unread,
Dec 13, 2021, 2:57:06 AM12/13/21
to adwords...@googlegroups.com
Hi DB,

Thanks for coming back. Unfortunately, our team can only provide assistance via this forum channel and through emails. You can provide private information or the screenshots via the reply to author option and if that is unavailable on your end, you can shoot a message to our email (googleadsscr...@google.com) instead. I should be able to tap the rest of the team for further investigation once you come back.

Google Ads Scripts Forum Advisor

unread,
Dec 14, 2021, 2:46:15 AM12/14/21
to adwords...@googlegroups.com
Hello DB,

Thank you for your continued cooperation on this. Allow me to tap the rest of the team for further investigation with regard to the issue at hand and rest assured that I will get back you as soon as new information becomes available. Let me know if there's anything else I can assist you with in the meantime.

David Baruch

unread,
Dec 28, 2021, 5:11:51 AM12/28/21
to Google Ads Scripts Forum on behalf of adsscripts
Hi Harry

Trust all is well.

Would appreciate any update on this item

Best and looking forward,
DB

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/p2f4V68lqD8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.

Google Ads Scripts Forum Advisor

unread,
Dec 29, 2021, 1:35:51 AM12/29/21
to adwords...@googlegroups.com
Hi DB,

I work along with Harry. As per checking, I'm afraid that this is still under investigation. We'll let you know the soonest we have our findings.

Regards,
Google Logo
Teejay Wennie Pimentel
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

Mat

unread,
Jan 13, 2022, 8:53:43 AM1/13/22
to Google Ads Scripts Forum
Hello, any updates? I have the same issue: no data for Performance Max in the reports.
Example query: "SELECT customer.descriptive_name, campaign.name, campaign.advertising_channel_type FROM campaign WHERE campaign.advertising_channel_type = PERFORMANCE_MAX"

Google Ads Scripts Forum Advisor

unread,
Jan 13, 2022, 10:09:55 PM1/13/22
to adwords...@googlegroups.com
Hi Mat,

Thanks for reaching out here. Unfortunately, there are still no updates on the issue raised here. Would you mind providing your Google Ads account ID and script name and relay that back to our wider team to further their investigation? Rest assured that I will get back to you as soon as new information on the issue becomes available.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

MATTHEW Dworkin

unread,
Feb 2, 2022, 4:17:23 AM2/2/22
to Google Ads Scripts Forum
Hi there,

Are there any updates? I'm having the same issue, I can't seem to pull any Performance Max campaigns when I pull a report.

Best,
Matt

Google Ads Scripts Forum Advisor

unread,
Feb 3, 2022, 12:33:01 AM2/3/22
to adwords...@googlegroups.com

Hello Matt,

 

I’m James, a colleague of Harry. Thank you for your patience.

 

Currently, we haven’t received any updates from the team and there’s no ETA yet regarding the fix of this issue as our team is continuously investigating the root cause of the issue. Having said that, rest assured that we will get back to you once we receive significant feedback from the rest of the team.

 

Regards,

Google Logo
James Howell Abarsoza
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

Giel

unread,
Feb 9, 2022, 5:59:48 AM2/9/22
to Google Ads Scripts Forum
Hi James,

I'm having the same issue here. And did some investigating. 
I can't get the performance max data with the old and the new version of the script. This also includes account level data. So account cost or cost_micros on customer level are missing the cost (and other data) from the performance Max campaigns. This is also the case when using the "search" method which sould retrieve data from the Google Ads API instead of the Adwords API.
I tested on Manager Account and account level.

But I can get the performance Max data when using the Google Ads API outsite of Google Ads Scripts. 

Hope your team will find a solution soon.

Best,
Giel

Google Ads Scripts Forum Advisor

unread,
Feb 10, 2022, 1:24:04 AM2/10/22
to adwords...@googlegroups.com

Hello Giel,

 

Thank you for chiming in on this thread.

 

Kindly provide the following details below so that I can take a look closer at the issue you are encountering and raise it to our internal team also if necessary. 

  • Google Ads account ID / CID
  • Script's name 
  • Shareable link to your spreadsheet, if available 

 

You may send the requested information via  ‘Reply privately to author’ option. If the private option is not available on your end, then please send it over through this alias <googleadsscr...@google.com>  instead.

 

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

Giel

unread,
Feb 15, 2022, 10:01:41 AM2/15/22
to Google Ads Scripts Forum
Hi James,

Any news on this? For a lot of scripts it's really an issue this isn't working properly.

Thanks!
Giel

Google Ads Scripts Forum Advisor

unread,
Feb 15, 2022, 11:56:02 PM2/15/22
to adwords...@googlegroups.com

Hello Giel,

 

Thank you for your patience. I regret to inform you that there are no updates yet from the team as we are continuously investigating the root of the issue. However, I will follow up this to them and rest assured that we will get back to you with an update.

Rafael Setti

unread,
Mar 15, 2022, 1:58:07 AM3/15/22
to Google Ads Scripts Forum
HI everyone, any uptades on this topic? I'm having the same issue. Can't get the performance max data.

Thanks! 
Rafael

Blaise Reymondin

unread,
Mar 15, 2022, 4:24:02 AM3/15/22
to Google Ads Scripts Forum
Any script analyzing an account that contains performance max campaigns becomes unusable. It's hard to understand why Google's roadmap doesn't include all the peripheral tools...

Google Ads Scripts Forum Advisor

unread,
Mar 15, 2022, 6:19:55 AM3/15/22
to adwords...@googlegroups.com
Hi all,

Thank you for following up. However, I'm afraid that this is still under investigation. We'll update this thread the soonest we finalize our findings.

Regards,
Google Logo
Teejay Wennie
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

Giel

unread,
Mar 16, 2022, 4:49:22 AM3/16/22
to Google Ads Scripts Forum
Hi All,

I did some testing yesterday and this morning again. I think there might be positive developments after all:
1. The new Google Ads scripts beta documentation redirects to the main documantation of ads scripts. Indicating it is out of beta?
2. The new Google Ads scripts environment does include the results of Performance Max campaigns in the account (customer) results.
3. Google has updated the  Account summary report for the new environment. I tested it and in my test it included the Performance Max results.
4. Yesterday it was not possible to get the results on the campaign level, but I tested it again this morning and now it is. So you can get the results for just your Performance Max campaigns.
5. Also since this morning you are able to get the results of Performance Max campaigns in the old Google Ads scripts environment. As long as you use the AdsApp.search method. Which fetches the data from the new Google Ads API instead of the old Google AdWords API.

So to get the Performance Max results either update you scripts in the old environment to include fetch the data via the AdsApp.search method or switch to the new environment.

Hope this helps!

Best, 
Giel

Blaise Reymondin

unread,
Mar 16, 2022, 3:57:45 PM3/16/22
to Google Ads Scripts Forum
Yes, the update has been done today. Now I finally see a P Max campaign returned in my test script. Hurrah.

16/03/2022 20:55:10
{"campaign":{"resourceName":"customers/6758978837/campaigns/15290889753","advertisingChannelType":"PERFORMANCE_MAX","name":"CH/fr PMax"},"segments":{"date":"2022-03-15"}}



Google Ads Scripts Forum Advisor

unread,
Mar 17, 2022, 1:43:18 AM3/17/22
to adwords...@googlegroups.com

Hello Everyone,

Thanks for sharing your observations regarding the Performance Max campaigns.

It's good to know that you can now retrieve those campaigns on your respective scripts.

For any script-relate concerns, do let our team know and we'll be happy to further assist you.

Regards,

Google Logo
Mark Kevin
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref
Message has been deleted

Blaise Reymondin

unread,
Mar 22, 2022, 10:30:20 AM3/22/22
to Google Ads Scripts Forum
Hello,

Unfortunately it looks that the Performance Max campaigns ist still not deployed among all objects / methods in the API.

The following code using the AdsApp.campaigns() method returns: 

# of campaign to check: 2

But in my account I have 3 enabled campaigns in this case (2 SEARCH + 1 P MAX).

Here is the script:

  var campaignSelector = AdsApp.campaigns().withCondition("Status = ENABLED");
  var campaignIds = [];
  var campaignIterator = campaignSelector.get();
  while (campaignIterator.hasNext()) {    
    var campaign = campaignIterator.next();
    var campaignId = campaign.getId();
    campaignIds.push(campaignId) ;      
  }
 
  Logger.log(" # of campaign to check: " + campaignIds.length);



Thanks again for your investigations / help.

Blaise


Blaise Reymondin

https://blaisebruno.com

Google Ads Scripts Forum Advisor

unread,
Mar 24, 2022, 6:19:40 AM3/24/22
to adwords...@googlegroups.com
Hi Blaise,

Other users reported that they weren't able to get the Performance Max campaign, but later reported back that they can now. With this, could you please try again at least tomorrow, then let me know how it goes?

Regards,
Google Logo
Teejay Wennie
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

Blaise Reymondin

unread,
Mar 28, 2022, 7:46:51 AM3/28/22
to Google Ads Scripts Forum
Hi Teejay,

The problem is that the problem has only partially been solved and some methods of the API still not return any Performance Max campaigns. In my previous examples we cannot get the Performance Max campaigns via AdsApp.campaigns()

In summary, from my latest tests today:

AdsApp.report() ✅
AdsApp.search() ✅
AdsApp.campaigns() ❌

It should be quite easy for you to test / replicate this.

Best,
Blaise

Google Ads Scripts Forum Advisor

unread,
Mar 29, 2022, 2:10:58 AM3/29/22
to adwords...@googlegroups.com

Hello Blaise,

 

Thank you for reporting this back to us.

 

I believe the issue is still being investigated and is currently in progress to resolved any relevant misbehaviors. We will update you on this thread once the full fixed has been released.

Regards,

Google Logo
Michael Angelo
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

Wesley Phuong

unread,
Apr 6, 2022, 4:08:57 AM4/6/22
to Google Ads Scripts Forum
Hi Teejay, any updates on this topic? 

Reinforcing Blaise last post; I just recently in the last few hours also tried utilizing AdsApp.campaigns too and have failed to retrieve any Performance Max campaigns. 

My script is as follows: 

function main() {
var campaignIterator = AdsApp.campaigns().withCondition("campaign.status = ENABLED").get();

while (campaignIterator.hasNext()) {
var campaign = campaignIterator.next();
var cn=campaign.getName().replace(/\s/g,'_');
campaign.urls().setCustomParameters({campaign: cn});
}
}


Thanks,
Wesley

Google Ads Scripts Forum Advisor

unread,
Apr 6, 2022, 11:26:47 PM4/6/22
to adwords...@googlegroups.com
Hi Wesley,

Thank you for following up. I am also a member of the Google Ads scripts team and let me provide support to your concern.

I can see that your concern has already been raised to another email thread. With this, I would suggest to continue the discussion of this issue there for better tracking of updates.

Regards,
Google Logo
Ernie John
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

Google Ads Scripts Forum Advisor

unread,
Jun 9, 2022, 6:53:46 AM6/9/22
to adwords...@googlegroups.com

Hello Wesley,

 

I hope you're doing well. I am Maia from the Google Ads Scripts team.

 

I just want to circle back in regards to the Performance Max campaign issue and let you know that the issue reported here has been fixed. If you have further questions, let us know and rest assured that we will address them as soon as possible.

 

Best Regards,

Google Logo
Angel Maia
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref
Message has been deleted
Message has been deleted

Google Ads Scripts Forum Advisor

unread,
Jun 14, 2022, 2:53:20 AM6/14/22
to adwords...@googlegroups.com
Hi Wesley,

Thank you for reaching out to us.

With regard to your concern, the AdsApp.campaigns() method does not return performance max campaigns. With this, we recommend to use GAQL to retrieve data those information instead. You may use this sample code for your reference.
 
function main() {

  var nrOfCampaigns = 0;
   
  var query =
      "SELECT " +
      "campaign.name, campaign.advertising_channel_type, metrics.clicks " +
      "FROM campaign "+
      "WHERE campaign.status = ENABLED AND campaign.advertising_channel_type = PERFORMANCE_MAX AND segments.date DURING THIS_MONTH";
 
  try {

    var result = AdsApp.search(query);

    while (result.hasNext()) {
      var row = result.next();
      Logger.log("CampaignName: '"+row.campaign.name+"' , Clicks: "+row.metrics.clicks);
      nrOfCampaigns++;
    }
  } catch (e) {
   Logger.log("### ERROR: "+e);
  }
 
  Logger.log("\nNumber of enabled PMax campaigns: "+nrOfCampaigns);
}

Regards,
Google Logo
Teejay Wennie
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

DB

unread,
Jun 14, 2022, 5:13:35 AM6/14/22
to Google Ads Scripts Forum
Hi Teejay

I am facing the same issue with custom parameters for PMAX campaigns.
Following your advice on using GAQL to fetch all campaigns (including PMAX),
You are still missing the part on how to update those campaigns' custom parameters, since we can not use campaign.urls().setCustomParameters({campaign: cn});.

Looking forward for your advise.

Google Ads Scripts Forum Advisor

unread,
Jun 15, 2022, 1:43:33 AM6/15/22
to adwords...@googlegroups.com

Hello,

James here, a colleague of Teejay. Allow me to assist you further.

I’m afraid that there are no options yet to update the custom parameters of those PMAX campaigns via Google Ads scripts. I said this because there is no specific selector that supports PMAX campaigns in Ads scripts aside from Ads script reporting along with GAQL. However, I believe that you can only set up the custom parameters of those type of campaigns in the Google Ads UI by following this guide. If you have any questions with the said guide, you may contact the Google Ads product support team through this link instead.

Hoping for your understanding. Let me know if you have any questions.

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

DB

unread,
Jun 15, 2022, 2:16:41 AM6/15/22
to Google Ads Scripts Forum
Thanks for the quick reply James

One can update custom parameters via script (for PMAX as well) using bulk upload.
For my use case I would prefer using selectors, but that work fine for now,

Thanks again

Google Ads Scripts Forum Advisor

unread,
Jun 15, 2022, 4:50:46 AM6/15/22
to adwords...@googlegroups.com

Hi,
 

Thanks for your response. If you have further questions / concerns for our team, please feel free to get back to us. We will be happy to address it.
 

Regards,

Google Logo
Darwin
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

K

unread,
Jun 27, 2022, 10:32:18 AM6/27/22
to Google Ads Scripts Forum
Hi,

We had shopping performance report scripts running but after the automatic upgrade to PMAX they stopped working correctly.

function main() {
 |||||
 |||||
 var report = AdsApp.report("SELECT OfferId, Clicks, Conversions, CostPerConversion, Cost, ConversionRate, CampaignName " +      
      "FROM SHOPPING_PERFORMANCE_REPORT " +
      "WHERE CampaignName CONTAINS_IGNORE_CASE 'shopping_funnel_nl' " +
      "DURING 20210601,20310301");
 
 report.exportToSheet(sheet0);
 |||||
 |||||
}

How can we convert this from SHOPPING_PERFORMANCE_REPORT to PMAX? I couldn't find any clear documentation.

Looking forward to hearing from you.

Kind regards,
Kai




Op woensdag 15 juni 2022 om 10:50:46 UTC+2 schreef adsscripts:

ahmad Awa

unread,
Jun 28, 2022, 2:59:17 AM6/28/22
to K via Google Ads Scripts Forum
I have suspended advertising accounts, suspended, reconsider activating the account at the same time

‫في الاثنين، 27 يونيو 2022 في 10:32 ص تمت كتابة ما يلي بواسطة ‪K via Google Ads Scripts Forum‬‏ <‪adwords...@googlegroups.com‬‏>:‬
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/4ceb1e35-0022-48aa-8b02-e2ef01467571n%40googlegroups.com.

Google Ads Scripts Forum Advisor

unread,
Jun 28, 2022, 3:16:04 AM6/28/22
to adwords...@googlegroups.com

Hello Kai,

Thank you for chiming in. I’m James from the Google Ads scripts support team. Allow me to assist you with your concern.

Based on the given context it appears that your shopping campaigns have been automatically upgraded to PMAX. That being said, to retrieve those performance max campaigns, you may use campaign resource in your query and filter it using campaign.advertising_channel_type, you may refer here for sample query.

Since I observed that you’re still using AWQL query in your reporting, I strongly recommend that you convert it to GAQL using this query migration tool and this resource mapping document as PMAX campaigns are mainly supported in GAQL.

Hope this helps. Let me know if you have any.

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2SbQHR:ref

Parv Patel

unread,
Jun 28, 2022, 8:43:22 PM6/28/22
to Google Ads Scripts Forum
Hello All, 

Screen Shot 2022-06-28 at 2.10.16 PM.png
Here's the query I am currently using to pull all pmax stats for each campaign, what field can I add here that pulls the "Final URL" associated with each of these pmax campaigns? 

Screen Shot 2022-06-28 at 2.07.14 PM.png

Thanks,
Parv

Parv Patel

unread,
Jun 28, 2022, 8:43:22 PM6/28/22
to Google Ads Scripts Forum
Hello All, 

Screen Shot 2022-06-27 at 7.32.41 PM.png

Screen Shot 2022-06-28 at 2.07.14 PM.png

I have this query that I use for fetching all my pmax campaign stats. What field can I use to pull the "Final URL" associated to each of these campaigns? 

Thanks,
Parv 

Google Ads Scripts Forum Advisor

unread,
Jun 28, 2022, 11:50:12 PM6/28/22
to adwords...@googlegroups.com

Hello Parv,

Thank you for chiming in on this thread. Allow me to assist you further.

I believe that you may include the campaign.final_url_suffix field in the SELECT clause of your GAQL query to retrieve the final url associated in each campaign in your account.

Let me know if that’s what you are looking for.

Regards,

Parv Patel

unread,
Jun 29, 2022, 12:29:28 PM6/29/22
to Google Ads Scripts Forum
Hey James, 

I tried campaign.final_url_suffix, but unfortunately that doesn't return anything. 

Screen Shot 2022-06-29 at 12.26.47 PM.png

Best,
P.

Google Ads Scripts Forum Advisor

unread,
Jun 30, 2022, 3:03:17 AM6/30/22
to adwords...@googlegroups.com

Hello,

Thank you for your response. For us to further investigate this issue, can you please provide us with the following information below via `Reply privately to author` option.

  • Google Ads account ID / CID
  • Script name
  • Whole screenshot of your Google ads account interface displaying the final url values  that you want to retrieve.

If the said option is not available on your end, you may send those through this email alias <googleadsscr...@google.com> instead.

Regards,

Wesley Phuong

unread,
Nov 14, 2022, 6:37:46 PM11/14/22
to Google Ads Scripts Forum
Hi James,

Following up on your previous reply regarding PMAX campaigns via Google Ads Scripts. Is the functionality to update custom parameters for PMAX campaigns available yet? 

Thanks,
Wesley

Google Ads Scripts Forum Advisor

unread,
Nov 15, 2022, 12:39:20 AM11/15/22
to adwords...@googlegroups.com

Hello Wesley,

Thank you for getting back to us.

Given that the performance max campaigns selector is now available in Google Ads scripts and it utilizes the urls method, I believe that you can now update the custom parameters of your PMAX campaigns. You can achieve this by implementing AdsApp.​PerformanceMaxCampaign along with urls method which gives you access to the performance max campaign's URL fields in your account. After that, you may now use the following methods below:

Reply all
Reply to author
Forward
0 new messages