Google Ads guide

How to Set Up a Google Ads Tracking Template

Set up a Google Ads tracking template by keeping the final landing page separate from the tracking URL, using {lpurl} and only the ValueTrack parameters you need, applying the template at the narrowest sensible level, and testing the complete click path before serving traffic. A tracking template tells Google Ads how to construct or call tracking information when someone clicks an ad. It does not replace the final URL, auto-tagging, conversion tracking, or the website’s own redirect and consent rules.

Google’s tracking-template definition says the template is where tracking information is placed and that it can use URL parameters to customize the final URL. This guide explains the decisions behind a safe setup. For click identifiers and the gclid setting, see how to set up Google Ads auto-tagging; for the broader conversion path, see how to set up Google Ads conversion tracking.

What a Google Ads tracking template controls

Google Ads has a final URL, which is the page the person should reach, and optional URL options that add tracking context. The tracking template is one of those options. It can call a third-party tracking endpoint, append ValueTrack parameters, or pass the landing-page URL into a controlled redirect before the person reaches the final destination.

Keep the responsibilities separate:

  • final URL: the actual landing page that should satisfy the ad and the user’s intent;
  • tracking template: the tracking structure and redirect logic, when needed;
  • final URL suffix: parameters appended to the landing-page URL without replacing the final destination;
  • custom parameters: advertiser-defined key-value pairs that can be referenced by the template;
  • auto-tagging: Google’s click identifier and connected product data, managed separately.

The safest design is the smallest one that produces the required measurement. A static tracker that does not include {lpurl} can send traffic to the wrong page or interfere with automated landing-page features. A template with unnecessary parameters can expose internal identifiers or create redirect failures.

Choose the right URL option

Use a tracking template when a tracker or redirect must receive the landing-page URL and tracking values. Use a final URL suffix when you only need to append query parameters to the final page. Use custom parameters when the advertiser needs named values that vary by campaign, ad group, keyword, or ad. Use auto-tagging when the goal is Google’s click identifier and linked Google product data.

These options can work together, but each additional layer creates another place for a URL to break. Draw the path before editing the account:

Google ad → tracking call, if needed → final URL → site route → conversion event

Then identify where each parameter is added, read, stored, or removed. If Analytics and Google Ads already receive the required click context through auto-tagging, do not add a third-party redirect merely to repeat the same value.

Select the template’s scope

Google Ads can apply URL options at multiple levels. A template inherited from a broader level applies until a more specific template overrides it. Google’s tracking documentation describes the hierarchy and notes that the most specific template is used; in the common order, a keyword-level setting is more specific than an ad, ad group, campaign, or account setting.

Use the broadest level that genuinely shares the same tracking behavior:

  • account: one tracker and parameter policy across the account;
  • campaign: different destinations or measurement rules for a campaign family;
  • ad group: an exception for a group with a distinct landing-page or tracker need;
  • ad or keyword: a deliberate test or exception that needs close ownership;
  • sitelink or asset: tracking for that asset’s destination when the interface exposes URL options.

Broad scope reduces repetition, while narrow scope makes exceptions visible. Do not put a campaign-specific static URL into an account-level template. After saving, inspect the tracking-template source so the serving ad inherits the template you intended.

Build a template with ValueTrack parameters

ValueTrack parameters are placeholders that Google Ads replaces with information about the click, campaign, ad group, keyword, device, or other eligible context. A simple append template might look like:

``text {lpurl}?campaign_id={campaignid}&ad_group_id={adgroupid} ``

If the final URL already has parameters, the separator and template form need to match the Google Ads syntax and the tracker’s requirements. A redirect-based template might look conceptually like:

``text https://tracker.example/redirect?url={lpurl}&campaign_id={campaignid} ``

These are patterns, not a drop-in tracker. The tracking provider must document how it expects the landing-page URL to be encoded, which parameters it accepts, how it handles redirects, and whether it supports parallel tracking. Google’s ValueTrack setup guide includes the current parameter list and examples.

Use only fields that answer a reporting question. Common choices include campaign ID, ad group ID, keyword or target ID, match type, device, and network. An ID is often more stable than a mutable name. If a parameter can contain reserved URL characters, rely on the documented Google and provider encoding behavior rather than concatenating raw values in application code.

Handle the query separator carefully

The difference between ? and & matters. A URL can have one query-string start, while additional parameters need to be joined with &. Test URLs with no existing query string, with an existing query string, with fragments, and with an encoded landing page. A template that works for /pricing can fail for /pricing?plan=team if the separators or encoding are wrong.

Do not place a fragment-only value where the tracker expects a server-readable query parameter. Fragments are handled by the browser and may not reach the server. Do not pass customer email addresses, phone numbers, names, or other sensitive data in a tracking template.

Add custom parameters only when you own the values

ValueTrack values come from Google Ads. Custom parameters let an advertiser define a name and value, such as a campaign-specific internal label, and reference it in a template. Google’s custom-parameter instructions describe the level-specific setup and the rule that the most specific parameter with the same name wins.

A controlled pattern might be:

``text {lpurl}?business_unit={_unit}&test={_variant} ``

Use custom parameters for non-sensitive values that the receiving analytics or tracking system actually uses. Write down the owner, allowed values, inheritance behavior, and retirement process. Avoid putting customer identifiers, email addresses, phone numbers, account credentials, or confidential product information into a custom parameter. A name that looks harmless can still expose sensitive data if the value is populated from an internal system without review.

If two levels define the same custom parameter, verify which one is applied to the serving ad. A template can be syntactically valid while receiving the wrong campaign label because an ad-level or keyword-level value overrides the broader value.

Consider a final URL suffix instead

If you only need to add parameters to the landing page, a final URL suffix is often easier to reason about than a redirect template. Google describes the suffix as a field where parameters are attached to the end of the final URL. It can be applied at account, campaign, ad group, dynamic-ad-target, or keyword levels according to the current interface.

For example, a suffix might contain:

``text utm_source=google&utm_medium=cpc&utm_campaign={campaignid} ``

The receiving site still has to accept the resulting query string, and the team must decide how it interacts with auto-tagging and other tracking parameters. Do not put {lpurl} in a suffix as if it were a redirect template. Choose one field based on whether you need a destination-building template or only appended parameters. Google’s final URL suffix guide provides the current UI path and scope options.

Account for parallel tracking

Google says parallel tracking sends the customer directly to the final URL while click measurement happens in the background. It is mandatory for Search, Shopping, Display, Video, and Performance Max campaigns, while hotel campaigns can have different options in the current account interface. This changes the assumptions a legacy click-tracker can make about redirect order.

Check that the tracking provider supports parallel tracking and that its tracking URL and redirects use HTTPS. Google’s parallel-tracking documentation warns that compatibility varies by provider. A tracker that expects the customer to pass through its redirect first may report missing clicks even though the landing page loads correctly.

Do not turn off or work around the platform’s current tracking behavior just to preserve an old integration. Update the provider or use a supported final URL or suffix design. Test mobile, desktop, different campaign types, and a destination with existing query parameters.

Enter and test the template in Google Ads

The exact navigation can change, but Google’s current setup guidance generally follows this pattern:

  1. Choose the level that owns the shared tracking behavior: account, campaign, ad group, ad, keyword, or supported asset.
  2. Open the relevant URL options or tracking-template field.
  3. Enter the template, beginning with {lpurl} when the template is intended to preserve the final landing page.
  4. Add only the required ValueTrack or custom parameters.
  5. Save the change and review the inherited template at the serving level.
  6. Use the Test action to ask Google Ads to combine the final URL and tracking configuration.
  7. Follow the resulting URL and inspect every redirect, status code, query parameter, and final page.

Google’s ValueTrack setup instructions show the test workflow for ad-group and ad-level templates. A successful Google Ads test proves that the URL can be constructed and reached in that test; it does not prove the third-party tracker, Analytics session, conversion event, or CRM join is correct. Those layers require their own evidence.

Test before and after publishing

Use a matrix that covers:

TestEvidence
Final URL without query parametersThe page loads with the expected appended or redirected tracking data.
Final URL with existing parametersNo parameter is overwritten, dropped, or malformed.
Template with an empty or unavailable ValueTrack valueThe destination remains valid under the documented fallback behavior.
HTTPS redirect chainEach server-side redirect reaches the expected host and path.
Parallel trackingThe customer landing page and background measurement both work with the provider.
Mobile and desktopDevice-specific routing does not break the template.
Conversion eventThe intended event fires once after the landing page and is reconciled with the source of truth.
RollbackRemoving the template restores a known-good final URL without leaving a hidden override.

Common tracking-template mistakes

  • using a static tracker URL without {lpurl} when the landing page must remain dynamic;
  • placing a campaign-specific template at account level and silently changing unrelated campaigns;
  • defining different templates at several levels without checking which one wins;
  • using ? after a final URL that already has a query string;
  • failing to encode a landing page inside a redirect according to the provider’s specification;
  • assuming the Test button proves the Analytics event or CRM import works;
  • using a tracker that is incompatible with parallel tracking;
  • leaving an HTTP redirect in a path that requires HTTPS;
  • passing sensitive customer data through URL parameters or custom values;
  • changing the template, final URL, conversion action, and UTMs in one release;
  • forgetting that a template can affect multiple ads when inherited from a broad level;
  • treating missing ValueTrack data as a reason to invent a fallback value without documenting it.

The pattern behind these errors is unclear ownership. Assign the final URL to the website or landing-page owner, the tracking template to the analytics or measurement owner, and the conversion event to the business system owner. Review the complete path together before publishing a broad change.

Use a pre-launch checklist

Before saving a Google Ads tracking template, record:

  1. the final URL and the business reason for tracking;
  2. the selected URL option: template, suffix, custom parameters, auto-tagging, or a deliberate combination;
  3. the scope and inheritance path;
  4. every ValueTrack and custom parameter, with an explanation of its use;
  5. tracker domain, HTTPS, server-side redirects, and parallel-tracking compatibility;
  6. behavior for existing query strings, fragments, empty values, mobile, and dynamic landing pages;
  7. Google Ads Test output, browser or network evidence, and final-page result;
  8. conversion, Analytics, CRM, consent, and rollback checks;
  9. owner, approver, change date, and expected reporting delay.

If the test fails, leave the last known-good template in place and fix the smallest broken layer. If the change has already served traffic, mark the affected period as a tracking change in reports rather than silently comparing it with an unmodified period.

Practical next step

Start with the final landing page, choose the smallest URL option that answers the measurement question, add {lpurl} and only necessary parameters, apply the template at the correct scope, and use Google Ads’ Test action plus an end-to-end controlled journey. Keep the template documented so the next person can distinguish a tracking change from a campaign-performance change.

For related measurement work, review Google Ads auto-tagging, Google Ads conversion tracking, and the free Google Ads audit for agencies. Those references can help identify the surrounding path; none should be described as automatically implementing a tracking template.