Hi All,
@Martijn - Your assistance for this issue is greatly appreciated.
@Bronson - I would also like to echo Martijn's response. Kindly note that a performance max campaign has it's own selector and it is different from that of the CampaignSelector being used in the script you provided. With this, you may modify the campaignIterator variable to: AdsApp.performanceMaxCampaigns().get().
Let us know how it goes on your end.
Best regards,
|
||||||
Hello Bronson,
You could instead implement two scripts wherein one gets performance max campaigns by using it's own selector and another which is using a CampaignSelector. You would just need to make the changes I had previously stated for this script to get performance max campaigns, or retain it in order to get search campaigns (just change AdWordsApp to AdsApp).
However, if you'd like for these two functionalities included in one script, then you may check the code attached below. I would recommend testing this first in Preview Mode. Once satisfied with the output, you can start the live execution of the script or schedule it.
Let us know if we can assist you with anything else.
Hi Bronson,
Thank you for the clarification and for your insights.
I've made some adjustments to the script to fit the use-case. This should get the performance max and search campaigns, show their costs for the month and pause them if the combined cost exceeds the monthly budget you've set (the value is currently 500).
Let me know if it works for you. You may also make updates to the script to fit your liking.
Hi Bronson,
Thank you for providing more context on this.
This script pauses all campaigns encompassing performance max and search campaigns, but kindly modify the logger in line 62 as it denotes that the retrieved campaigns are performance max. Please note that the selector just above it does retrieve non-performance max campaigns. Additionally, I would also suggest to modify line 83 and 84 to just `campaigns.pause()` in order to pause the campaigns pushed in the campaignList.
In the event that you would still encounter an issue on your end, kindly provide your Google Ads account ID or CID so we're able to further investigate.
Hi Bronson,
Thank you for your patience on this. Please check the file I had attached for the updated version. Kindly let us know if you need further assistance or have any clarifications.