Guides · Google Ads
{lpurl} Encoding
When to use {lpurl}, {lpurl+2}, {lpurl+3},
{escapedlpurl}, and {unescapedlpurl} — and how to count redirect hops
so the destination survives the chain.
When a Google Ads click goes through a tracker and the landing URL arrives mangled —
%253F instead of ?, missing UTMs, a 404 that only happens in production —
the wrong {lpurl} variant is usually why. There is no useful Google Ads error for this.
The Test button can look fine while real clicks still break.
{lpurl}is context-sensitive. At the start of the template it is inserted raw. After?or=it is URL-encoded. The+2/+3variants force extra encoding layers for redirect hops that re-encode the destination.
Field ownership (template vs Final URL suffix) is covered in tracking template vs Final URL suffix. Account-level patterns live in the Ideal tracking template setup.
{lpurl} is
ValueTrack substitutes your ad’s Final URL (landing page) into the tracking template
at click time. Google requires some form of landing-page insertion parameter in the template —
almost always {lpurl} or a redirect that wraps it.
Encoding exists because that Final URL often sits inside another URL’s query string.
Characters like ?, &, and = must be escaped so the outer
tracker does not treat them as its own delimiters.
| Variant | What Google inserts | Use when |
|---|---|---|
{lpurl} |
Context-dependent: raw at the start of the template; encoded after ? / = |
Default for almost every template |
{escapedlpurl} |
Always encoded once | You need encoding even if position would leave {lpurl} raw |
{unescapedlpurl} |
Never encoded | Rare — destination is not a query value (easy to break parsers) |
{lpurl+2} |
Encoded twice | One hop re-encodes the destination before the last decode |
{lpurl+3} |
Encoded three times | Two re-encoding hops in the chain |
{lpurl} — the defaultNo redirect tool? The whole template can be:
{lpurl}
With a tracker that takes the landing URL as a query value:
https://track.example.com/click?url={lpurl}&cid={campaignid}
Here {lpurl} sits after =, so Google inserts an encoded Final URL
(https%3A%2F%2F…). The tracker decodes once and redirects. That is the normal one-hop case.
Paste-ready examples: ClickCease, ClickPatrol, HubSpot.
{lpurl+2} / {lpurl+3} — extra hops
Some chains decode, then pass the destination through another URL builder that encodes it again.
Each of those re-encode steps consumes a layer. If you under-encode, an intermediate hop splits on
& and drops half the destination. If you over-encode, the browser lands on a URL full of
%25 / %253F and analytics never sees clean query keys.
Practical rule: count how many times the destination is URL-encoded before the last system that redirects the user. Match that with {lpurl}, {lpurl+2}, or {lpurl+3}.
Google Ads → fraud filter (hop 1) → your tracker (hop 2) → landing page
→ often {lpurl+2} in the template’s url= parameter
Google Ads → filter → CRM / marketing hop → your tracker → landing page
→ try {lpurl+3}; verify with a real click, not only the Test button
Split-field stacks (redirect in template, UTMs in suffix) still need the right encoding on the redirect side — see HubSpot + ClickCease and ClickCease + WhatConverts.
{escapedlpurl} vs {lpurl}
They are not always identical. {escapedlpurl} is always encoded.
{lpurl} stays unencoded when it is the first thing in the template.
Prefer {escapedlpurl} only when you must force encoding regardless of position.
For …?url={…} templates, plain {lpurl} is enough.
{unescapedlpurl} — usually wrong in query strings
Raw Final URL with live ? and &. Drop that into
?url={unescapedlpurl} and the outer query string breaks: the tracker steals
utm_* (or worse) as its own parameters. Avoid unless you know the destination is not
sitting inside another query value.
| Setup | Typical variant in url= |
|---|---|
Template is only {lpurl} (no third-party redirect) |
{lpurl} |
One tracker: https://tracker/…?url={…} → landing page |
{lpurl} (encoded once by position) |
| Tracker A → tracker B → landing page (B re-encodes) | {lpurl+2} |
| Three systems that each re-encode before the last hop | {lpurl+3} |
| Destination must never be encoded | {unescapedlpurl} (rare) |
Vendor dashboards sometimes ship {lpurl+2} by default because their product is hop one
and something else sits after it. Still verify your chain — copy-paste defaults are a common
source of silent %25 bugs.
| Symptom | Likely fix |
|---|---|
%253F / %2526 in the address bar after redirects |
Over-encoded — drop one level (+3 → +2, or +2 → {lpurl}) |
| UTMs or path chopped off; tracker “destination” looks truncated | Under-encoded — go up one level |
| Works in a pasted browser URL, fails on a real ad click | You tested the landing page, not the full redirect chain. Click the ad (or use Test, then open the resolved URL and follow redirects) |
| Google rejects the template on save | Missing a landing-page parameter entirely — template must include {lpurl} (or allowed variant) |
Use the Test control next to the tracking template in Google Ads, then inspect the final URL after every hop. Confirm in GA4 Realtime that source/medium and landing page look sane.
{lpurl}? Done.?…={lpurl}? Stay on {lpurl}.{lpurl+2}.{lpurl+3}, or remove a hop — long chains add latency and failure points.Build or validate a template in the tracking template builder. Token list: Google Ads ValueTrack parameters.
{lpurl} and {escapedlpurl} the same?
Not always. {escapedlpurl} is always encoded. {lpurl} is raw when it starts the template
and encoded when it follows ? or =.
{lpurl+2} “just to be safe” with one hop?
No. Extra encoding often shows up as %25 garbage and UTMs that analytics cannot parse.
Match the real hop count.
{lpurl} belong in the Final URL suffix?No. Suffix is query keys only. {lpurl} belongs in the tracking template.
{lpurl+2}?Their product is usually the first redirect and they assume another encoder sits behind them. Confirm against your live chain.
{unescapedlpurl} in a query parameter?
The outer URL parser treats & / ? inside the destination as its own separators.
Use an encoded variant instead.
{lpurl+4}?
Google documents up through +3 in common ValueTrack material. If you need more layers, shorten the
redirect chain — you are past a healthy architecture.
Encoding behaviour is the same. Where you set the template (account / campaign / ad group) differs; hop count still depends on your redirect tools, not campaign type.