Create and edit URLs and parameters

Use DoubleClick Search macros in URL parameters

Dynamically add DoubleClick Search names and IDs to landing page URLs

DoubleClick Search macros output the name of the engine account, campaign, ad group, or keyword given credit for a click on an ad in a search engine account. To pass this data to your landing pages, specify a DS macro as the value of a URL parameter in your URL templates or landing page URLs. Learn more about using URL parameters to send data to your site.

Macro names are case sensitive.

DoubleClick Search macros are not available in social or engine track accounts.

Use the {ignore} placeholder in AdWords and Bing Ads accounts

If you add a DoubleClick Search (DS) macro directly to a landing page URL in an AdWords or Bing Ads engine account, it's recommended that you use the {ignore} ValueTrack parameter to indicate that the macro is used for tracking purposes only. If you don't use this parameter, AdWords or Bing Ads may disapprove of the keyword or ad.

Make sure that any parts of the URL that affect the content of your landing page appear before the {ignore} parameter. Here's an example landing page URL that includes the {ignore} parameter and a DS macro:
http://www.example.com/shoes?channel=paidsearch{ignore}&ds_kid=[*KeywordID*]

In the example above, the advertiser's site may use the "channel=paidsearch" parameter to adjust the content on the landing page, so it appears before {ignore}. The advertiser uses the ds_kid parameter for tracking purposes only, so it's recommended that it appears after {ignore}.

Note that you don't need to use the {ignore} parameter in DS URL templates, product group URLs, or URLs for AdWords dynamic targets. You only need the use the parameter if you're specifying DS macros directly in a landing page URL (which DS traffics to the final URL in the engine).

The {ignore} placeholder not needed in other accounts

In other types of engine accounts, the {ignore} placeholder isn't needed in landing page URLs.

Macros not supported in custom parameters

DoubleClick Search does not support macros that are specified in AdWords custom parameters.

For example, in the following custom parameter, DoubleClick Search may not provide data for the [*TrackerID*] macro:
{_channel}=paidsearch&kw=[*TrackerID*]

Parallel tracking and DS macros

AdWords parallel tracking sends customers directly from your ad to your final URL while click measurement happens in the background (without sending customers to the tracking URLs first). If you turn on parallel tracking for an AdWords engine account, DS can't replace DS macros with relevant values.

If your landing pages rely on data from DS macros, don't turn on parallel tracking. Learn more about compatibility issues with AdWords parallel tracking.

List of DS macros

You can specify any of the following DS macros as the value of a query string in a keyword landing page URL:

Macro Description Example
[*Part_Site*] The name of the DS engine account that contains the keyword, with + substituted for spaces. In DS, you add something like this to a keyword's landing page URL:
&ds_p=[*Part_Site*]

For keywords from an engine account named "US - NonBrand ID 123-456-7890", the following appears in the landing page URL:
&ds_p=US+-+NonBrand+ID+123-456-7890

[*EngineAccountID*] The full DS ID of the engine account that contains the keyword. In DS, you add something like this to a keyword's landing page URL:
&ds_eid=[*EngineAccountID*]

For keywords from an engine account with an ID of "700000000025606", the following appears in the landing page URL:
&ds_eid=700000000025606

[*AffiliateID*] The short-form ID of the engine account that contains the keyword.

The short-form ID for an engine account is the letter k followed by the last digits of the full DS ID that are not preceded by zeros.

In DS, you add something like this to a keyword's landing page URL:
&ds_aid=[*AffiliateID*]

For keywords from an engine account with an ID of "700000000025606", the following appears in the landing page URL:
&ds_aid=k25606

[*EngineAccountType*]
or [*Part_Comp*]
The type of engine account that contains the keyword. DS outputs the engine type in all capital letters, such as GOOGLE, MICROSOFT, YAHOO_JAPAN. In DS, you add something like this to a keyword's landing page URL:
&ds_e=[*EngineAccountType*]

For keywords from an AdWords engine account, the following appears in the landing page URL:
&ds_e=GOOGLE

Instead of [*EngineAccountType*], you could add something like this in DS and see the same result in the landing page URL:
&ds_e=[*Part_Comp*]

[*Campaign*] The name of the campaign that contains the keyword, with + substituted for spaces. In DS, you add something like this to a keyword's landing page URL:
&ds_c=[*Campaign*]

For keywords from a campaign named "RLSA Brand Terms", the following appears in the landing page URL:
&ds_c=RLSA+Brand+Terms

[*CampaignID*] The full DS ID of the campaign that contains the keyword. In DS, you add something like this to a keyword's landing page URL:
&ds_cid=[*CampaignID*]

For keywords from a campaign with an ID of "71700000002467374", the following appears in the landing page URL:
&ds_cid=71700000002467374

[*Adgroup*] The name of the ad group that contains the keyword, with + substituted for spaces. In DS, you add something like this to a keyword's landing page URL:
&ds_ag=[*Adgroup*]

For keywords from an ad group named "Branded Terms", the following appears in the landing page URL:
&ds_ag=Branded+Terms

[*AdgroupID*] The full DS ID of the ad group that contains the keyword. In DS, you add something like this to a keyword's landing page URL:
&ds_agid=[*AdgroupID*]

For keywords from an ad group with an ID of "58700000049629024", the following appears in the landing page URL:
&ds_agid=58700000049629024

[*searchterm*] Keyword text with + substituted for spaces. In DS, you add something like this to a keyword's landing page URL:
&ds_k=[*searchterm*]

For a keyword named "red shoes", the following appears in the landing page URL:
&ds_k=red+shoes

[*TrackerID*]

The full DS ID for a DS item that can specify a landing page:

  • Keyword
  • Product group
  • Dynamic target
  • Sitelink
  • Ad

For example, you add something like this to a keyword's landing page URL:
&ds_kid=[*TrackerID*]

For keywords from an ad group with an ID of "43700000771348238", the following appears in the landing page URL:
&ds_kid=43700000771348238

[*KeywordID*]

The short-form ID for a DS item that can specify a landing page:

  • Keyword
  • Product group
  • Dynamic target
  • Sitelink
  • Ad

The short form ID is the letter p followed by the last digits of the full DS ID that are not preceded by zeros.

In DS, you add something like this to a keyword's landing page URL:
&ds_kids=[*KeywordID*]

For a keyword with an ID of "43700000771348238", the following appears in the landing page URL:
&ds_kids=p771348238

[*KeywordIDNL*] The short-form ID without a letter. That is, the last digits of the full DS ID that are not preceded by zeros. In DS, you add something like this to a keyword's landing page URL:
&ds_kidnl=[*KeywordIDNL*]

For a keyword with an ID of "43700000771348238", the following appears in the landing page URL:
&ds_kidnl=771348238

[*GCLID*]
and
[*GCLSRC*]

To identify specific clicks on ads, AdWords or DS can generate case-sensitive IDs called click IDs. Learn more about click IDs and when they are generated.

If a click ID has been generated, DS automatically appends the ID in a URL parameter named gclid.  DS also appends the gclsrc parameter to indicate which system, DS or AdWords, generated the ID. Learn more about gclsrc.

If you want the click ID and click source to be available in additional parameters with names other than gclid and gclsrc, use the [*GCLID*]and [*GCLSRC*] macros.

[*GCLID*] outputs the click ID generated for a click, and [*GCLSRC*] indicates which system generated the ID. If neither AdWords nor DS has generated a click ID, the output of these macros will be empty.

In DS, you add something like this to a keyword's landing page URL:
&gclick=[*GCLID*]&gsrc=[*GCLSRC*]

The following appears in the landing page URL:
&gclick=CPGxi9a5hcICFdSMKwodvRgAaA
&gsrc=ds
&gclid=CPGxi9a5hcICFdSMKwodvRgAaA
&gclsrc
=ds

Note that the click ID and click source data appear twice: once in the parameters you manually added and once again in the parameters that DS adds automatically.

DoubleClick Campaign Manager macros

If your organization uses DoubleClick Campaign Manager (DCM), you can use DCM macros as well as DS macros to pass data to your landing pages. For example, the %m DCM macro expands into an encrypted DoubleClick cookie ID  if browser settings make cookies available.  (This macro is needed if you use DCM to upload offline conversions.)

DCM macros are available for search ads because both DCM and DS use the same clickserver. That is, the DS clickserver URL and the DCM clickserver URL redirect clicks to the same server. If the server detects DS macros or DCM macros, it will provide any available values before redirecting to the landing page.

When including DCM macros in DS landing page URLs or URL templates, you need to URL encode the % at the beginning of the macro name. The URL code for the percent character is %25. For example, here's how you specify the %m macro in a DS URL template:
{unescapedlpurl}?user_id=%25m

Note that for clicks on search ads, the clickserver won't have values for some DCM macros. For example, %b isn't applicable to search ads. If you include it in a DS URL template or landing page URL, the clickserver won't return a value and the URL parameter in the landing page URL will be empty.

Parallel tracking and DCM macros

As with DS macros, DCM macros are not compatible with AdWords parallel tracking. If your landing pages rely on data from DCM macros, don't turn on parallel tracking. Learn more about compatibility issues with AdWords parallel tracking.

Was this article helpful?
How can we improve it?