You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
update_campaign / draft_campaign: set campaign URL options (tracking template, final URL suffix, custom parameters) #105
Situation. We tag all paid traffic with UTM parameters through a campaign-level tracking template, so analytics can attribute sessions and conversions by campaign, ad group and keyword. After building two Search campaigns through AdLoop, the template was one of the few settings that still needed the Google Ads UI. The weekly check also can't confirm it's still set without a hand-written GAQL query.
What I tried.draft_campaign and update_campaign have no URL options. run_gaql reads campaign.tracking_url_template (both new campaigns: empty), but nothing writes it.
What the API offers. Three fields on Campaign:
tracking_url_template: a string with {lpurl} and ValueTrack parameters
final_url_suffix
url_custom_parameters: a list of CustomParameter{key, value}
Proposed change. Optional tracking_url_template, final_url_suffix and url_custom_parameters on draft_campaign and update_campaign, all omitted by default. Validation:
the template must contain {lpurl} or one of its variants
custom parameter keys and values are checked against Google's length limits
The preview would show the template applied to the campaign's final URL, so a typo is visible before it's applied. The dry run already catches anything Google rejects.
Happy to PR once you're happy with the shape. It touches the same files as the location option (#104), so the two could share a PR or go one after the other, whichever you prefer.
Yes, also welcome, as its own PR after or alongside #104:
Optional tracking_url_template, final_url_suffix and url_custom_parameters on draft_campaign and update_campaign. Omitted means unchanged; an empty string (or an empty list) clears the value, and the preview shows that as a removal.
Keep our own validation light: {lpurl} (or one of its variants) in the template, and the key and value length limits. The validate_only dry run catches anything else Google rejects.
Showing the template applied to the campaign's final URL in the preview is a great idea, please do.
get_campaign_settings reads all three back since 0.36.0.
Thanks. PR is up: #116, separate from #115. Omitted is unchanged; ""/[] clears it and the preview names the removal. Validation is just {lpurl} and the key/value lengths. example_click in the preview shows one of the campaign's final URLs with the template applied.
Activity
kLOsk commentedon Oct 27, 2026
Yes, also welcome, as its own PR after or alongside #104:
tracking_url_template,final_url_suffixandurl_custom_parametersondraft_campaignandupdate_campaign. Omitted means unchanged; an empty string (or an empty list) clears the value, and the preview shows that as a removal.{lpurl}(or one of its variants) in the template, and the key and value length limits. Thevalidate_onlydry run catches anything else Google rejects.get_campaign_settingsreads all three back since 0.36.0.xgp commentedon Oct 27, 2026
Thanks. PR is up: #116, separate from #115. Omitted is unchanged;
""/[]clears it and the preview names the removal. Validation is just{lpurl}and the key/value lengths.example_clickin the preview shows one of the campaign's final URLs with the template applied.draft_campaign / update_campaign: campaign URL options
Campaign URL options on draft_campaign and update_campaign (#116)