The in-game tracking code is required to track conversions to installs. The in-game tracking code is available for several popular platforms and is easy to adjust to your own needs. Usually, it takes just a few minutes to set everything up.
An important step is to take into account that you only want to execute the in-game tracking code for new users. Existing users do not need to be attributed to a source, since they were already playing the game before you started your campaign on Steam Data Suite.
The easiest way to execute the in-game tracking code for new users only is to check for save files. On first run, simply check if there is a save file available. If so, then this user has already played your game and the in-game tracking code should not execute. The specific way of checking for a new user is dependent on your game.
The in-game tracking code is available is a number of popular game platforms. And we also supply a pseudo-code example in case you use a different engine. Implementing the in-game tracking code usually takes about 15 minutes. Below is a list of supported platforms:
Be sure to only run the SendAttribution function for new users only. For example, this can be done by checking if there is no save file available.
# Import a library that enables http posts import library http # Local storage/save file initially var attribution_done = False # Central script class SendAttribution(): try: response = http.send_http_post( 'http://steam.gs/ca/GAMEKEY' ) if response.content.length > 0: attribution_done = True # Optional: Feed your in-game analytics tool the campaign values of the user # On game start, after loading local storage if attribution_done == False: SendAttribution()