{*lpurl} ValueTrack parameters in Tracking Templates

2,389 views
Skip to first unread message

Dorian Kind

unread,
May 20, 2015, 6:17:14 AM5/20/15
to adwor...@googlegroups.com
Hello,

while preparing for the upcoming Upgraded URLs migration, we started to wonder about the difference between {lpurl} and {escapedlpurl} in Tracking Templates. Previously, the two parameters would be encoded differently, insofar that {lpurl} would not encode colons and slashes (but some other characters like question marks), whereas {escapedlpurl} would encode all reserved characters. The current documentation at https://support.google.com/adwords/answer/2375447 only states that {lpurl} won't be escaped at all if it's located at the beginning of the tracking template. Can you confirm that {lpurl} and {escapedlpurl} are still encoded differently (and if so, maybe update the documentation)?

Thanks for any feedback and best regards,
Dorian

PS. I realize this is not strictly an API-related question, however I have the feeling that I am more likely to get a correct answer here than I would on the Adwords product forum...

Anash P. Oommen (AdWords API Team)

unread,
May 21, 2015, 1:24:20 PM5/21/15
to adwor...@googlegroups.com, dor...@webrepublic.ch
Hi Dorian,

TL;DR; don't use {escapedlpurl}, use {lpurl} instead.

The longer answer is that {escapedlpurl} works exactly like {lpurl}, except when used at the beginning of the url. {lpurl} works fine in this case, whereas {escapedlpurl} would break the serving URL. This is because {lpurl} escapes the URL while keeping the validity of serving URL in mind, whereas {escapedlpurl} always escapes the URL completely, thus breaking the URL in some cases if it appears at the beginning.

E.g. consider the following setup:

(1) Param within a URL


(2) Param at the beginning of a URL

  (a) trackingTemplate: {lpurl}&trackerid={_trackerid}, finalUrl1 = http://www.example.com?foo=bar, trackerid = 1234
  (b) trackingTemplate: {escapedlpurl}&trackerid={_trackerid}, finalUrl1 = http://www.example.com?foo=bar, trackerid = 1234
  Serving URL1 = http%3A%2F%2Fwww.example.com%3Ffoo%3Dbar&trackerid=1234

Hope this helps?

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Dorian Kind

unread,
May 22, 2015, 12:04:12 PM5/22/15
to adwor...@googlegroups.com, dor...@webrepublic.ch
Hi Anash,

many thanks for your comprehensive answer! One follow-up question: Based on your examples I take it that there is no longer a ValueTrack parameter which only encodes the query string of the final URL—like {lpurl} used to do for Dynamic Search ads. Ex.


Is it correct that this escaping behavior is no longer available?
I'm asking because I seem to remember that there were a few third-party tracking setups that required the destination URL to be encoded like this. But maybe these tools were adjusted in the meantime.

Thanks again & best regards,
Dorian
Reply all
Reply to author
Forward
0 new messages