Add Campaign.UrlCustomParameters

130 views
Skip to first unread message

China Wendel

unread,
May 14, 2024, 9:25:09 AM5/14/24
to Google Ads API and AdWords API Forum
Hello, I am trying to add a list of Campaign-level UrlCustomParameters through the Google Ads API, but the Google.Ads.GoogleAds.V16.Resources.Campaign object in C# has a read-only Campaign.UrlCustomParameters variable, so I can't set this property to mutate it.

Is there another way to do this, besides modifying the Campaign through Google Ads Editor?

Google Ads API Forum Advisor

unread,
May 15, 2024, 6:56:24 AM5/15/24
to chin...@gmail.com, adwor...@googlegroups.com
Hi,

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

To add url custom parameters at a campaign level using Google Ads API, I would recommend you to use this customers.campaigns.mutate method where you can create, update, or remove campaigns.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tIyBO:ref" (ADR-00234932)

Thanks,
 
Google Logo Google Ads API Team


China Wendel

unread,
May 17, 2024, 6:22:18 PM5/17/24
to Google Ads API and AdWords API Forum
So, I am trying to use the C# library, Google.Ads.GoogleAds. And, the Campaign object there that I would send in to the mutate method has a readonly UrlCustomParameters variable, so there is no way for me to mutate it.

Google Ads API Forum Advisor

unread,
May 20, 2024, 7:47:16 AM5/20/24
to chin...@gmail.com, adwor...@googlegroups.com
Hi,

Please be informed that you can add and update custom urls at a campaign level using urlCustomParameters field using this  customers.campaigns.mutate method. You can pass the key and value to each custom url parameter that you want to set. I would recommend you refer to this Custom parameters guide for more information. If you still face issues, provide us the url of the code that you are referring to add custom parameters using #c library to assist you further.

China Wendel

unread,
May 22, 2024, 8:35:05 PM5/22/24
to Google Ads API and AdWords API Forum
We are not using the REST interface directly, as I said, we are using the C# library. There is no customers.campaigns.mutate method in the C# library. https://github.com/googleads/google-ads-dotnet

unnamed.png
Attached is a picture of what I'm talking about. The Campaign object is a Google.Ads.GoogleAds.V16.Resources.Campaign object.

Google Ads API Forum Advisor

unread,
May 23, 2024, 4:45:01 AM5/23/24
to chin...@gmail.com, adwor...@googlegroups.com
Hi,

Your issue is specific to the client library of C#. I would request that you raise the issue here by clicking on the button “New Issue". Please note that the mentioned concerns are out of scope for the Google Ads API support team as our team specializes in Google Ads API related concerns and technical implementations only.

I hope this helps! Feel free to get back to us if you have any further queries.
Reply all
Reply to author
Forward
0 new messages