URL Parameters & Macros

URL ParametersURL Parameters - A way to pass information about a Touchpoint through its tracking URL. You can insert URL parameters into your URLs to track information about a particular Touchpoint. URL parameters are made of a key and a value separated by an equals sign (=) and joined by an ampersand (&). The first parameter always comes after a question mark in a URL. For example, http://gsght.com/c/12345?ad=12345&ad_name=Customers and MacrosMacros - A variable portion of a Destination URL or Postback URL denoted by a key surrounded in curly braces. For example https://gamesight.io?utm_campaign={ad_group} uses an {ad_group} macro to dynamically fill in UTM parameters. can be used together to dynamically manage all of your Gamesight Trackers. These two features together with a bit of creativity can let you do anything from managing Dynamic Trackers, to giving users unique landing pages, to setting up complex Ad Network integrations.

URL Parameters

Hierarchy Parameters

Read more about passing Tracker HierarchyTracker Hierarchy - The structure in which Trackers are ordered allowing you to model your campaigns at the Network, Campaign, Ad Group, and Ad levels. parameters through URL Parameters in the Dynamic Trackers guide.

URL Parameter

Description

Default

campaign

Tracker's Campaign ID

None

campaign_name

Campaign's display name in the Console

Inherits Campaign ID value

ad_group

Tracker's Ad Group ID

None

ad_group_name

Ad Group's display name in the Console

Inherits Ad Group ID value

ad

Tracker's Ad ID

None

ad_name

Ad's display name in the Console

Inherits Ad ID value

Sub IDs

SubIDs are arbitrary tag-like parameters that can be used as filters/groups in reporting. This is useful if you have dimensions beyond the Tracker Hierarchy parameters that you want to report by.

URL Parameter

Description

Default

sub1

Sub ID 1

None

sub2

Sub ID 2

None

sub3

Sub ID 3

None

sub4

Sub ID 4

None

sub5

Sub ID 5

None

Cost

Cost parameters can be used to help you track the cost of each Touchpoint for campaigns that are running with simple pricing models. Review the Measuring ROAS guide for more details on working with cost reporting.

URL Parameter

Description

Default

cost_model

The model to use when assigning cost to this touchpoint. Allowed values are: CPM, CPC, CPI

CPC

cost_amount

Cost amount on a per unit basis. For example, for a 1.00 CPI this field would be set to 1.00

0.00

cost_currency

Currency that cost information is reported in.

USD

External IDs

If any of the External IDs that you are using for direct attribution are known at the time of click/impression those values can be passed directly as URL Parameters instead of using the Web SDK to create session mappings. General details about External ID implementation can be found in the Web Measurement SDK Quick Start.

URLParameterName

Description

Default

xid[][id]

The External ID value, format depends on the Type provided.

None

xid[][type]

The External ID Type, supported types can be found here.

None

xid[][sha256]

Set the hashing behavior for this external ID.

  • client: you are sending a hashed ID
  • server: our ingestion servers hash the ID prior to storage
  • unset: stores the ID unhashed

None

xid[][scope_type]

Please contact us for details on External IDs that are scoped to an Organization

None

xid[][scope_id]

Please contact us for details on External IDs that are scoped to an Organization

None

As an example here are a few complete External ID definitions using URL Parameters:

# Passing a single id
?xid[0][id]=123456789&xid[0][type]=steamid64

# Passing a single id with hashing options
?xid[0][id]=testing&xid[0][type]=xbgt&xid[0][sha256]=server

# Passing multiple ids
?xid[0][id]=123&xid[0][type]=psid&xid[1][id]=456&xid[1][type]=xuid

Miscellaneous

URL Parameter

Description

Default

attribution_window

Click through attribution window (in seconds) for this Touchpoint. Only valid on Click Tracking URLs

None. Inherited from Parent Tracker(s)

impression_attribution_window

View through attribution window (in seconds) for this Touchpoint. Only valid on Impression Tracking URLs

None. Inherited from Parent Tracker(s)

destination_url

Full URL to redirect user to. Only valid on Click Tracking URLs. More details below

None. Inherited from Parent Tracker(s)

Destination URL

The destination_url macro can be useful for complex tracking scenarios where you have multiple landing page variants. By passing destination_url to your tracker you can override the Destination URL value set on your tracker.

For example, if you have a tracker https://gsght.com/c/XXXXXX that normally directs users to https://gamesight.io but you want to send some traffic selectively to https://store.steampowered.com you can override the Destination URL like so:

https://gsght.com/c/XXXXXX?destination_url=https://store.steampowered.com

This link will now send the user to Steam when clicked. Some common use cases for the destination_url macro include:

  • Overriding the landing page when working with Dynamic Trackers - specifically for managing multiple landing pages on Facebook Ads.
  • Managing multiple localized landing pages without generating separate Trackers for each page.
  • Chaining your Gamesight tracking structure with third party click measurement solutions such as Sizmek or DCM.

URL Encoding

In order to resolve ambiguity around urls being passed in the destination_url parameter, it may be necessary to URL encode the value sometimes. Take the following example landing page:

https://gamesight.io?page=abc&campaign=123

Now if you want to use this link in the destination_url macro it isn't clear whether you are intending to pass the campaign parameter to your Tracker or if it is a field on the landing page.

https://gsght.com/c/XXXXXX?destination_url=https://gamesight.io?page=abc&campaign=123

As you see in this example the server interprets the &campaign=123 parameter to be passed as a value to the Tracker, not as a part of the landing page:

https://gsght.com/c/XXXXXX?destination_url=https://gamesight.io?page=abc&campaign=123

The solution to ensure that our server always knows what page you are intending to direct the user to is URL Encoding, so with encoding you use the following URL:

https://gsght.com/c/XXXXXX?destination_url=https%3A%2F%2Fgamesight.io%3Fpage%3Dabc%26campaign%3D123

Which removes the ambiguity so the Tracker clearly knows where to send the user. There are several free online tools which let you encode URLs in addition to a built-in Excel function.

Macros

Built-In Macros

The following macros are available on all click tracking links despite their values not being passed through the URL Parameters.

Macro

Description

Example Value

{click_id}

ID for current click

9025267f-6bab-4861-a88c-85f6568f389a

{game_id}

Game ID for Tracker used for click

100

{team_id}

Team ID for Tracker used for click

100

{network}

Network for Tracker used for click

twitter

{campaign}

Campaign for Tracker used for click

my-campaign

{ad_group}

Ad Group for Tracker used for click

group-1

{ad}

Ad for Tracker used for click

ad-1

Custom Macros

Any parameter passed to the click URL (whether that is a SubID, cost, or even a
custom parameter that you append) can be replaced in the destination URL for the
tracker.

For example, if my tracker has a destination URL of:
https://gamesight.io?group={sub1}&token={my_token}

We can use a click link of:
https://gsght.com/c/12345?sub1=Users&my_token=aaabbbccc

This will send the user to:
https://gamesight.io?group=Users&token=aaabbbccc


Did this page help you?