Google Ads dynamic UTM tracking templates: ValueTrack parameters and {lpurl} setup

Key takeaways
- Account, campaign, and ad group tracking templates in Google Ads must include a URL insertion parameter such as {lpurl}, or landing page links will break when clicked.
- Google Ads ValueTrack IDs (such as {campaignid} and {adgroupid}) are 64-bit dynamic tokens populated automatically at click time.
- Map ValueTrack tokens to standard GA4 parameters (utm_source, utm_medium, utm_campaign, utm_id, utm_term, utm_content) so sessions classify cleanly in GA4 Traffic acquisition.
- Always keep auto-tagging (gclid) enabled alongside UTMs, and verify your final resolved URL with Google Ads' built-in Test button before saving.
Manual UTM tagging breaks the first time someone duplicates a Google Ads campaign and forgets to rename utm_campaign on 14 ads. Dynamic tracking templates solve that failure mode by injecting click-time data directly from Google Ads into your landing page query string.
Per Google Ads Help: Set up tracking with ValueTrack parameters, ValueTrack parameters record click metadata such as device, match type, keyword, and 64-bit campaign IDs. When you configure a tracking template at the account, campaign, or ad group level, Google requires a URL insertion parameter such as {lpurl}; without it, the landing page URL breaks on click. To make those values readable in Google Analytics 4, pair them with the standard UTM keys documented in Analytics Help: URL builders.

Copy-paste dynamic tracking templates (Account and Campaign level)
Use the account-level template below when you want every Search, Shopping, and Performance Max click to carry consistent UTM parameters without editing individual ads. If you only need query parameters appended to your Final URL (with no third-party redirect server), place the parameter string after the question mark into the Final URL suffix field instead, or use the {lpurl} tracking template below:
If you prefer human-readable campaign names in GA4 instead of numeric IDs, Google Ads does not provide a native {campaignname} ValueTrack parameter. Keep utm_id={campaignid} in the account-level template for joining cost data, then either set a readable utm_campaign via campaign-level custom parameters (such as {_campaign}) or build clean campaign-specific links using the Foisto UTM builder.
Core ValueTrack parameters mapped to GA4 UTMs
Google Analytics 4 reads specific UTM keys to populate its Traffic acquisition report. Keep utm_source and utm_medium lowercase (google and cpc) so GA4 default channel groups classify traffic under Paid Search or Paid Shopping rather than Unassigned.
GA4 UTM key | Recommended value / ValueTrack token | What it captures at click time | Implementation note |
|---|---|---|---|
utm_source | Traffic referrer | Keep lowercase across all campaigns to avoid split rows in GA4. | |
utm_medium | cpc | Marketing medium | Matches GA4 default Paid Search channel rules. |
utm_id | {campaignid} | 64-bit Google Ads campaign ID | Required by GA4 if you upload or join external campaign cost data. |
utm_campaign | {campaignid} or {_campaign} | Campaign identifier or custom name | Use a campaign-level custom parameter {_campaign} if you want readable names. |
utm_term | {keyword} | Matched Search keyword | Populates on Search; remains blank on Display and Shopping placements. |
utm_content | {adgroupid} or {creative} | Ad group or ad creative ID | Helps isolate winning ad groups or creative variants in CRM attribution. |
Extra diagnostics | matchtype={matchtype}&device={device} | e/p/b match type and m/t/c device | Useful for CRM lead-quality audits without polluting GA4 campaign names. |
Where to place the template in Google Ads
- Account-level default (recommended): In Google Ads, open Admin -> Account settings -> Tracking, paste the {lpurl} template into Tracking template (or paste only the query string without {lpurl}? into Final URL suffix), and click Test.
- Campaign-level override: Open Campaigns -> Settings -> Campaign Settings. Per Google Ads Help, add the Tracking template column via Modify columns -> Attributes -> Tracking template if you manage overrides in bulk.
- Verify Dynamic Search Ads and auto-targets: Google Ads Help notes that Dynamic Search Ads and auto-targets require a URL insertion parameter ({lpurl}, {escapedlpurl}, or {lpurl+2}) at all levels.
- Run the built-in URL Test and QA your redirects: Click Test inside URL options and confirm every resolved landing page returns HTTP 200 with your UTM parameters intact (no 301 redirect stripping query strings). Then run through the conversion tracking checklist.
QA check before rolling out account-wide
After saving your template, click one live ad or run the URL tester and inspect the final URL in your browser address bar. Confirm that existing query parameters on product pages (such as ?variant=123) do not create a double question mark (?variant=123?utm_source=...). Using Final URL suffix avoids double-question-mark bugs because Google Ads automatically decides whether to prepend ? or &. Once traffic flows for 48 hours, verify clean channel attribution in your weekly ads reporting prompt.
Frequently asked questions
What does {lpurl} do in a Google Ads tracking template?
{lpurl} inserts your ad's Final URL when someone clicks the ad. Per Google Ads Help, account, campaign, and ad group tracking templates must include a URL insertion parameter like {lpurl} or the landing page link will break.
Should I use Tracking Template or Final URL Suffix for Google Ads UTMs?
If you only append UTM parameters and do not route clicks through a third-party click-tracking server, Final URL Suffix is safer because Google Ads automatically handles whether to add a ? or & and avoids double-question-mark errors.
Is there a {campaignname} ValueTrack parameter in Google Ads?
No. Google Ads provides {campaignid} (a 64-bit numeric ID) as a built-in ValueTrack parameter. To pass human-readable campaign names dynamically, define a campaign-level custom parameter such as {_campaign} and reference it in your template.
Will adding UTM parameters break Google Ads auto-tagging (gclid)?
No, as long as auto-tagging stays enabled in Google Ads Account settings. Google appends gclid alongside your UTM parameters so GA4 and Google Ads keep full auto-tagged reporting while your CRM captures the UTMs.
