Search
Clear search
Close search
Google apps
Main menu

Welcome to the help center for DoubleClick Search, a platform for managing search marketing campaigns.  While the help center is available to the public, access to the DoubleClick Search product is available only to subscribing customers who are signed in. To subscribe or find out more, contact our sales team.

Create and apply URL templates

Properties for URL templates

Use this format when creating a URL template:
Redirect URL{unescapedlpurl}{escapedlpurl}, {lpurl}, or {lpurl+nURL parameters ]

For example:

  • {unescapedlpurl}?campaign=[*Campaign*]
  • https://example.tracker.com?c_id=123&t_url=
    {escapedlpurl}%3Fcampaign%3D[*Campaign*]

​See more examples below.

Formatting details

Redirect URL

Optionally specify a URL for an additional tracking service. DoubleClick Search (DS) will redirect clicks to this URL.

Here’s an example redirect URL:
https://example.tracker.com?c_id=123&t_url=

Landing page placeholder

Specify any of the following placeholders for the landing page URLs you've defined:

{unescapedlpurl}{escapedlpurl}, {lpurl}, {lpurl+2}, or {lpurl+3}:

Note the differences between the placeholders:

  • {unescapedlpurl} inserts the landing page URL exactly as you entered it when you created the ad, keyword, or sitelink.

    This is the placeholder to use if you are not specifying a redirect URL. It can appear at the beginning of a URL template.

  • {escapedlpurl} is intended to be used with a redirect URL. It encodes the landing page URL before inserting it. If you add URL parameters to template, you'll need to encode them manually (assuming the redirect service requires you to encode them).

    It cannot appear at the beginning of a URL template.

  • {lpurl}, {lpurl+2}, or {lpurl+3} is intended to be used with a redirect URL.

    {lpurl} is equivalent to {escapedlpurl} in non-AdWords accounts. In AdWords accounts, there is a subtle difference between {lpurl} and {escapedlpurl}. Learn more about the differences between {escapedlpurl} and {lpurl} in AdWords accounts.

    {lpurl+2} escapes the landing page URL twice.

    {lpurl+3} escapes the landing page URL three times.

    If you add URL parameters to template, you'll need to encode them manually (assuming the redirect service requires you to encode them).

    This placeholder cannot appear at the beginning of a URL template.

    Landing page tests: If the URL template in effect for a keyword uses the {lpurl+2} or {lpurl+3} placeholder, you can't include that keyword in a landing page test. Only keywords with URL templates that use {unescapedlpurl}, {escapedlpurl}, or {lpurl} can be in landing page tests.

 

URL parameters

Optional URL parameters to append to {unescapedlpurl}{escapedlpurl}, or {lpurl}.

It's recommended that you start the URL parameters in a template with the ? character. If necessary, DS (or the engine in accounts with shared templates) will change ? to & automatically. That is, if the landing page URL already specifies a query string, the leading ? in the URL template will be replaced with &.

If you specify neither ? nor & in front of the query string, the result depends on whether the URL template is in an engine account with shared templates:

  • In an account with shared templates, DS traffics the URL template to the engine, and the engine applies the template. Therefore, the engine's own logic determines what happens. For example, AdWords does not insert ? or & if they are missing. So this URL template in an AdWords account:
    {escapedlpurl}campaign=[*Campaign*]
    Results in a landing page URL such as:
    http://example.com/shoescampaign=Shoes-Brand

  • In an account without shared templates, DS applies the URL template and inserts ? or & if they are missing. So this URL template in an account without shared templates:
    {escapedlpurl}campaign=[*Campaign*]
    Results in a landing page URL such as:
    http://example.com/shoes?campaign=Shoes-Brand

If you need these URL parameters to be encoded, enter the encoded string in the template. DS does not encode parameters specified in the template, even if you use the {escapedlpurl} placeholder for the landing page URL.

The Insert parameter list displays all DS macros for your convenience. Use DS macros anywhere in your URL template to dynamically generate landing page URLs that contain campaign or keyword-specific values. To append a DS macro to your landing page URLs, you can select one from the list or type it yourself.

Here’s an example of what you might enter:
{unescapedlpurl}?campaign=[*Campaign*]&keyword=[*KeywordID*]&src={param2}

You can include DS macros or AdWords ValueTrack parameters in the template, but DS will convert any spaces in the substituted value to the + character.

For example, if a customer searches for winter coat, a URL template that specifies the kw=[*searchterm*] query string will pass kw=winter+coat to the landing page.

Reserved parameters

The parameter names listed below are reserved for DoubleClick Search internal use only. If you add them to a landing page URL, DoubleClick Search will report an error and will not traffic the item to the engine.

If you're already using any of these parameter names for your own tracking purposes, you'll need to change the landing page parameter option in the engine accout to Include full URL (unencoded). With this option, DS wraps your landing page URLs and enables you to use any parameter name.

  • ds_e_adid
  • ds_e_cmpid
  • ds_e_device
  • ds_e_kwdid
  • ds_e_kwgid
  • ds_e_matchtype
  • ds_e_placement
  • ds_e_product_id
  • ds_e_product_target_id
  • ds_e_searchquery
  • ds_e_searchterm
  • ds_e_source
  • ds_s_adid
  • ds_s_cmpid
  • ds_s_kwgid
  • ds_s_sleid
  • ds_s_sli
  • ds_url_v
  • lid
  • sadid

Example landing pages and templates

Landing page

URL template

URL after applying the template

https://example.com/shoes {unescapedlpurl}
?campaign=[*Campaign*]
https://example.com/shoes
?campaign=[*Campaign*]

https://example.com/shoes
?p_id=42

https://example.tracker.com?c_id=123&t_url=
{escapedlpurl}
%3Fcampaign%3D[*Campaign*]

https://example.tracker.com?c_id=123&t_url=
https%3A%2F%2Fexample.com%2Fshoes
%3Fp_id%3D42%26campaign%3D[*Campaign*]

https://example.com/shoes
?p_id=42

Non-AdWords account:
https://example.tracker.com?c_id=123&t_url=
{lpurl}
%3Fcampaign%3D[*Campaign*]

https://example.tracker.com?c_id=123&t_url=
https%3A%2F%2Fexample.com%2Fshoes
%3Fp_id%3D42%26campaign%3D[*Campaign*]

https://example.com/shoes
?p_id=42

AdWords account:
https://example.tracker.com?c_id=123&t_url=
{lpurl}
%3Fcampaign%3D[*Campaign*]

https://example.tracker.com?c_id=123&t_url=
https://example.com/shoes
%3Fp_id%3D42%26campaign%3D[*Campaign*]

URL fragments

Support for URL fragments varies depending on whether an engine supports shared templates.

URL fragments in accounts with shared templates

In accounts with shared templates, add URL fragments at the end of the URL template. Don't specify URL fragments in the landing page URLs.

If you add a fragment to the end of the landing page URL, any URL parameters in the template will be interpreted as part of the fragment. For example:

  1. A URL template specifies parameters after the landing-page placeholder:
    {unescapedlpurl}?c=d

  2. A landing page URL contains a URL fragment:
    https://example.com?a=b#frag1

  3. When the engine applies templates, it will not move the URL fragment to the end of the effective landing page URL, and the URL parameters appearing after the placeholder will become part of the URL fragment.
    For example: https://example.com?a=b#frag1&c=d

  4. Because web browsers do not pass URL fragments to web sites,  your web site won't see the "c=d" parameter. Instead, the "c=d" parameter will be treated as part of the URL fragment by the browser.

Instead, put the URL fragment at the end of the URL template. After the engine applies templates, the fragment will be at end of the landing page URL. For example:

Landing page

URL template

URL after applying the template

https://example.com?a=b {unescapedlpurl}?c=d#frag1 https://example.com?a=b&c=d#frag

URL fragments in accounts that don't support shared templates

In accounts that do not support shared templates, if you add fragments to each landing page URL DS will move the URL fragment to the end of the landing page URL after it applies URL templates.

If you use redirect URLs and you have landing page URLs with {ifmobile} / {ifnotmobile} parameters, do not place URL fragments within the parameters themselves.

For example, if you create this URL template:
https://tracker.com?url={escapedlpurl}

A landing page that looks like this is not valid in DS:
https://{ifmobile:a.com#frag1}{ifnotmobile:b.com#frag2}

Instead, do either of the following:

  • Specify a URL fragment outside of the {ifmobile} / {ifnotmobile} parameters. This effective landing page is valid in DS:
    https://tracker.com?url=https://{ifmobile:a.com}{ifnotmobile:b.com}#frag1
  • Don't use a redirect URL. This effective landing page is valid in DS:
    https://{ifmobile:a.com#frag1}{ifnotmobile:b.com#frag2}​​
Was this article helpful?
How can we improve it?