广告营销

关于{lpurl}和{escapedlpurl}的不同 – 来自AdWords API Team[未完成]

先贴在这里,容以后有时间再解释

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

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

(2) Param at the beginning of a URL

(a) trackingTemplate: {lpurl}&trackerid={_trackerid}, finalUrl1 = http://www.example.com?foo=bar, trackerid = 1234
Serving URL1 = 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.

来源:https://groups.google.com/g/adwords-api/c/knJQKKBFBnM/m/No6CvYacwfwJ

Leave a Reply

Your email address will not be published. Required fields are marked *