Errors Posting App Exclusions to Shared Exclusion List via Google Ads Scripts

46 views
Skip to first unread message

Clayton Laramie

unread,
May 28, 2025, 9:32:24 AM5/28/25
to Google Ads Scripts Forum
We are trying to add app placement exclusions to a shared exclusion list at the mcc level using a Google Ads script that reads the exclusions from a Google Sheet. We already do this for websites and it works fine.

For App Exclusions, we use similar code and it works for some app placements, but others fail with reason "Placement URLs must be provided in a valid URL format" even though we can manually upload those App Exclusions via the online interface with the same URL that we are trying to upload via the script. Examples below.

some app placement urls rejected.jpg

One example from this list is Candy Crush. With a scheduled upload reading the same list of app URLs, it works fine to exclude with the full placement URL. 


Manually uploading via the online interface works with either of the following, but none of these three work via script.

com.king.candycrushsaga
mobileapp::2-com.king.candycrushsaga

Again, the strange part is that the first one works for websites and works for some app placements, but not all of them. Thoughts on how to eliminate the not valid URL error for app exclusion uploads via scripts?

Gemini suggests providing the following info
  • You are trying to add app placements (e.g., mobileapp::2-com.king.candycrushsaga) to an MCC-level exclusion list using a Google Ads Script.
  • The excludedPlacementList.addExcludedPlacement() call in Apps Script completes without throwing an error, leading the script to believe the addition was successful.
  • However, the Google Ads UI "Changes" history shows the operation failed with the error "Placement URLs must be provided in a valid URL format."
  • Crucially, adding the exact same string (e.g., mobileapp::2-com.king.candycrushsaga) manually through the Google Ads UI to the same exclusion list works successfully.
  • Also mention that adding the full Play Store URL manually works, but also fails via script with the same misleading error (and the script also doesn't catch this failure).
Thanks

Google Ads Scripts Forum

unread,
May 28, 2025, 6:03:53 PM5/28/25
to Google Ads Scripts Forum
Hi,

Thank you for reaching out to the Google Ads Scripts support team.

Based on the provided information, I understand that you are encountering a 'Placement URLs must be provided in a valid URL format' error while trying to add app placement exclusions to a shared exclusion list via the Google Ads Scripts. In order to investigate your issue further, kindly provide us with the following details:
  • Google Ads account ID / CID
  • Name of the affected script
  • If the script uses a spreadsheet, please provide a shareable link to the spreadsheet.
You can send the details via Reply privately to the author option, or direct private reply to this 'googleadsscr...@google.com'.

Thanks & Regards,
Google Ads Scripts support team.

Clayton Laramie

unread,
May 29, 2025, 9:43:17 AM5/29/25
to Google Ads Scripts Forum
Reply to author option was greyed out so I forwarded to the direct private reply option provided. Please let me know if you need anything else.
Reply all
Reply to author
Forward
0 new messages