Besides the ability to track standard links, Steam Data Suite also allows you to track visitors to your websites. This is a great tool if you use a website or landing page to promote your game as a visit to your page can be an attribution source.
Our JS library enables you to send any call you may need to the SDS endpoints. It also has helper functions to make it easy to populate the necessary data object.
Download the libraryDownload and self-host the library. It has no dependencies. Include it in the html of the desired page, preferably near the end.
<script src="path-to-file/SteamDataSuite_web.js"></script>
Run the initialization code with create() anywhere after including the library. The game-specific key needed for this can be found on the Dynamic Links page.
<script>
sds.create('1b5c2b980b5942b08faf7ff9fbba0000')
</script>
There are two events you can trigger, representing different ways of applying tracking. Firstly a Send event sends a click-like signal to Steam Data Suite to register any non-click event for later attribution. Secondly the Update event allows you to update all links on a page with the appropriate Steam Data Suite campaign parameters.
Parameters used in sending an event can be fixed numerical values, based on the values on the Dynamic Links page, string values, or parsed parameters from the current url, if necessary converting it along the way.
Sends a click-like signal to register any non-explicit click for later attribution. You can trigger this either when your website visitor performs a specific action, or on loading the page.
<script>
sds.send({
type: 1, // Represents 'Sales/Installs'
channel: 5, // Represents 'Ads other'
name: sds.fromurl( 'utm_campaign', 'unknown' ), // Gets the value for utm_campaign from url, uses 'unknown' as fallback
variant: sds.fromurl( 'utm_medium', 'organic' ), // Gets the value for utm_medium from url, uses 'organic' as fallback
})
</script>
It is not uncommon to configure fixed numerical values for type and channel, only using the name and variant field for campaign specific string values. By doing this
Calling this finds all Steam Data Suite links on the page and replaces the URL to a version with the correct tracking parameters. More info
<a href="https://steam.gs/aRc74/">Buy now!<a>
<script>
sds.update({
type: 1, // Represents 'Sales/Installs'
channel: 5, // Represents 'Ads other'
name: sds.fromurl( 'utm_campaign', 'unknown' ), // Gets the value for utm_campaign from url, uses 'unknown' as fallback
variant: sds.fromurl( 'utm_medium', 'organic' ), // Gets the value for utm_medium from url, uses 'organic' as fallback
})
</script>
If everything is configured properly you should see your own activity in the Campaign overview page. Some remarks;
Initializes the library. Only after this is done Triggers and Helper functions can be used.
Parameter | Description | Type of value | Required |
---|---|---|---|
Game key | Game specific identifier retrieved from Dynamic Links. | 1b5c2b980b5942b08faf7ff0fbba0000 | Yes |
Debug mode enabled | 'true' to see console.log() debug feedback for the module. False by default. | 'true'/'false' | No |
sds.create('1b5c2b980b0942b08faf7ffffbba0000')
The game-specific key will be used for all requests, and allows us to understand for which game the request is intended.
Sends a non-click campaign event to Steam Data Suite servers
Key | Description | Mandatory | Value |
---|---|---|---|
type | Campaign type | Yes | Integer from the list of allowed values |
channel | Campaign channel | Yes | Integer from the list of allowed values |
name | Descriptive name of campaign | Yes | A string matching the requirements |
variant | Description of variant within the campaign, usually used to describe creative, audience, etc. | No | A string matching the requirements |
<script>
sds.send({
type: 1,
channel: 2,
name: sds.string( 'Event landing page' ),
variant: sds.string( 'Buy now button footer'),
})
</script>
When triggered finds all Steam Data Suite links on the page, and replaces the destination of that link to include the fed campaign parameters. Links are processed if they are <a> elements with a href starting with https://steam.gs/.
Key | Description | Mandatory | Value |
---|---|---|---|
type | Campaign type | Yes | Integer from the list of allowed values |
channel | Campaign channel | Yes | Integer from the list of allowed values |
name | Descriptive name of campaign | Yes | A string matching the requirements |
variant | Description of variant within the campaign, usually used to describe creative, audience, etc. | No | A string matching the requirements |
<script>
sds.update({
type: 1,
channel: 2,
name: sds.string( 'Event landing page' ),
variant: sds.string( 'Buy now button footer'),
})
</script>
Reads a URL parameter value from the current page URL, for use as one of the campaign values for any of the triggers.
Parameter | Description | Type of value | Required |
---|---|---|---|
Name | URL key name to use the value of. | String | Yes |
Default | Value to default to in case the key is missing from the URL. | String(url safe) or integer, depending on the value needed. | No |
Conversion table | In case a URL value needs to be converted, for example from channel name (string) to the appropriate channel id (integer), a conversion can be facilitated. | Object with pairs to look for and replace. Values not in the object get passed as is. | No |
<script>
sds.send({
type: 1,
channel: sds.fromurl( 'utm_medium', 13, {'facebook':2, 'google':1, 'reddit':4} )
name: sds.fromurl( 'utm_channel', 'organic' ),
variant: sds.fromurl( 'utm_content' ),
})
</script>
Helper function that can be used to URL-encode any text value. Should be used for all manually provided thus non-encoded string. String() does not need to be used for a parameter where you are already using sds.fromurl() as it's safe to say the values we collect from the URL are already URL-encoded.
Parameter | Description | Type of value | Required |
---|---|---|---|
value | The value to make url-safe | String | Yes |
<script>
sds.send({
type: 1,
channel: 5,
name: sds.string( 'Maybe/søme,funky...characters!' ),
variant: sds.string( 'Or just a string with spaces'),
})
</script>