Use Search Ads 360 custom parameters or macros

Add Search Ads 360 names and IDs to landing page URLs

To create URL parameters that contain the name of the client account, campaign, ad group, or keyword that generated a click on an ad, use one of the following Search Ads 360 features:

  • In Google Ads accounts, use custom parameters. In these accounts, Search Ads 360 automatically creates custom parameters that contain the name and ID of each client account, campaign, ad group, and keyword. If you include these custom parameters in a Final URL or Final URL suffix, the data will be available to the landing page when a customer clicks your ad. (URL parameters defined in a tracking template might not be sent to the landing page, depending on how you define the template. The best practice is to place tracking parameters that your landing pages require in a Final URL suffix.)
  • In Microsoft Advertising accounts, use macros. You can specify a macro as the value of a URL parameter in a Final URL or tracking template. When a click on an ad is redirected through Search Ads 360, Search Ads 360 replaces macros with the name of the client account, campaign, ad group, or keyword that generated the click.

List of Search Ads 360 custom parameters and macros

The following table describes Search Ads 360 custom parameters and macros.

The custom parameter names in the table below are reserved. If you try to use these names when creating new custom parameters in Search Ads 360, Search Ads 360 will report an error and will not post the parameters you created to the client account.

Macro names are case sensitive. Custom parameter names are not case sensitive.

Custom parameter Macro Description
{_dsaccountid}
Location: Campaign custom parameters
[*EngineAccountID*]

The full Search Ads 360 ID of a client account.

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&ds_eid={_dsaccountid}

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&ds_eid=[*EngineAccountID*]

For clicks attributed to a client account with an ID of "700000000025606", the following appears in the landing page URL:
&ds_eid=700000000025606

{_dsaccounttype}
Location: Campaign custom parameters
[*EngineAccountType*]

The type of client account in all capital letters, such as GOOGLE, MICROSOFT, YAHOO_JAPAN.

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&ds_e={_dsaccounttype}

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&ds_e=[*EngineAccountType*]

For clicks attributed to a Google Ads client account, the following appears in the landing page URL:
&ds_e=GOOGLE

{_dscampaign}
Location: Campaign custom parameters
[*Campaign*]

The name of a campaign, with + substituted for spaces.

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&ds_c={_dscampaign}

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&ds_c=[*Campaign*]

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

{_dscampaignid}
Location: Campaign custom parameters
[*CampaignID*]

The full Search Ads 360 ID of a campaign.

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&ds_cid={_dscampaignid}

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&ds_cid=[*CampaignID*]

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

{_dsadgroup}
Location: Ad group custom parameters
[*Adgroup*]

The name of an ad group, with + substituted for spaces.

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&ds_ag={_dsadgroup}

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&ds_ag=[*Adgroup*]

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

{_dsadgroupid}
Location: Ad group custom parameters
[*AdgroupID*]

The full Search Ads 360 ID of an ad group.

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&ds_agid={_dsadgroupid}

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&ds_agid=[*AdgroupID*]

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

{_dssearchterm}
Location: Keyword custom parameters
[*searchterm*]

Keyword text with + substituted for spaces.

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&ds_k={_dssearchterm}

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&ds_k=[*searchterm*]

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

{_dstrackerid}
Location: Custom parameters for keywords, product groups, and dynamic ad targets.

Sitelinks inherit these custom parameters.

[*TrackerID*]

The full Search Ads 360 ID for a Search Ads 360 item that can specify a landing page:

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

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&ds_kid={_dstrackerid}

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&ds_kid=[*TrackerID*]

For clicks attributed to an item with an ID of "43700000771348238", the following appears in the landing page URL:
&ds_kid=43700000771348238

{_dskeywordid}
Location: Custom parameters for keywords, product groups, and dynamic ad targets.

Sitelinks inherit these custom parameters.

[*KeywordID*]

The short-form ID for a Search Ads 360 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 Search Ads 360 ID that are not preceded by zeros.

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&ds_kids={_dskeywordid}

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&ds_kids=[*KeywordID*]

For clicks attributed to an item with an ID of "43700000771348238", the following appears in the landing page URL:
&ds_kids=p771348238

{gclid}

[*GCLID*]

To identify specific clicks on ads, Google Ads or Search Ads 360 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, the ID appears in a URL parameter named gclid.

If you want the click ID to be available in an additional parameter with a name other than gclid, use the {gclid} ValueTrack parameter in Google Ads accounts and the [*GCLID*] macro in other accounts.

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&gclick={gclid}

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&gclick=[*GCLID*]

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

Note that the click ID appears twice: once in the parameter you manually added and once again in the parameter that is added automatically.

In accounts that use parallel tracking, Search Ads 360 automatically adds the gclsrc parameter to a Final URL suffix [*GCLSRC*]

If a click ID has been generated, Search Ads 360 also appends the gclsrc parameter to indicate which system, Search Ads 360 or Google Ads, generated the ID. Learn more about gclsrc.

If you want the click source to be available in an additional parameter with a name other than gclsrc, do one of the following:

  • In a Google Ads account, create your own URL parameter that contains the static value provided by Search Ads 360.
  • In a Microsoft Advertising account, use the [*GCLSRC*] macro.

Examples
In a Google Ads account, add this to a Final URL suffix or Final URL:
&source=ds

In a Microsoft Advertising account, add this to a tracking template or Final URL:
&source=[*GCLSRC*]

The following appears in the landing page URL:
&source=ds
&gclsrc
=ds

Note that the click source data appears twice: once in the parameter you manually added and once again in the parameter that Search Ads 360 adds automatically.

Not available in accounts that use parallel tracking [*AffiliateID*] The short-form ID of a client account.

The short-form ID for a client account is the letter k followed by the last digits of the full Search Ads 360 ID that are not preceded by zeros.

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

For clicks attributed to a client account with an ID of "700000000025606", the following appears in the landing page URL:
&ds_aid=k25606

Not available in accounts that use parallel tracking [*KeywordIDNL*]

The short-form ID without a letter. That is, the last digits of the full Search Ads 360 ID that are not preceded by zeros.

Example
In Search Ads 360, you add something like this to a keyword's landing page URL:
&ds_kidnl=[*KeywordIDNL*]

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

Not available in accounts that use parallel tracking [*Part_Site*]

The name of a Search Ads 360 client account, with + substituted for spaces.

Example
In Search Ads 360, you add something like this to a keyword's landing page URL:
&ds_p=[*Part_Site*]

For clicks attributed to a client account named "US - NonBrand ID 123-456-7890", the following appears in the landing page URL:
&ds_p=US+-+NonBrand+ID+123-456-7890

Not available in accounts that use parallel tracking [*Part_Comp*]

The type of a client account in all capital letters, such as MICROSOFT, YAHOO_JAPAN.

Example
In Search Ads 360, you add something like this to a keyword's landing page URL:
&ds_e=[*Part_Comp*]

For clicks attributed to a Yahoo! JAPAN Ads client account, the following appears in the landing page URL:
&ds_e=YAHOO_JAPAN

Campaign Manager 360 macros

Campaign Manager 360 macros are not supported in accounts that use parallel tracking.

If your organization uses Campaign Manager 360, client accounts that don't use parallel tracking can include Campaign Manager 360 macros as well as Search Ads 360 macros to pass data to your landing pages.

For example, the %m Campaign Manager 360 macro expands into an encrypted DoubleClick cookie ID if browser settings make cookies available. (This macro is needed if you upload offline conversions from the Campaign Manager 360 API and use encrypted user IDs to identify the conversions.)

As of July 1, 2020, user IDs won't be populated in Data Transfer or the %m macro for users in California. Learn more about changes to Data Transfer.

Campaign Manager 360 macros are available for search ads because both Campaign Manager 360 and Search Ads 360 use the same click server. That is, the Search Ads 360 tracking URL and the Campaign Manager 360 tracking URL redirect clicks to the same server. If the server detects Search Ads 360 macros or Campaign Manager 360 macros, it will provide any available values before redirecting to the landing page.

When including Campaign Manager 360 macros in Search Ads 360 Final URLs or tracking 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 Search Ads 360 tracking template:

{unescapedlpurl}?user_id=%25m

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

Related links

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

Search
Clear search
Close search
Google apps
Main menu
759628208096827907
true
Search Help Center
true
true
true
true
true
5055977
false
false