Tracking Specifications

Sportradar code helps advertisers better reaching their intended audience and measuring the success of their advertising campaigns they are running through Sportradar Technology.

Advertisers that use Sportradar Tag Manager Code must:

  • Publish on your website a privacy policy that includes:

  • A clear and appropriate description of how data may be used on your website;

  • A message that third-parties, including Sportradar, may place and use the code on your website to show interest-based ads to your visitors on sites across the Internet;

  • Information about how a visitor to your website can opt out of receiving interest- based ads from Sportradar by visiting the relevant Sportradar Advertising Preferences;

  • Obtain your visitors’ consent and/or satisfy such other applicable legal requirements for the use of pixels by third parties, including Sportradar and its Affiliates

  • Not collect or pass to Sportradar any personally identifiable information through the code, including but not limited to, names, email addresses, and telephone numbers

  • Not use any code provided by Sportradar on any site, app or service directed to people under age 18 (or the age defined by applicable law), or which collect or solicit information from people under age 18 (or the age defined by applicable law)

  • Not use any code provided by Sportradar to reach audiences based on sensitive personal information, as defined by applicable law, including but not limited to based on financial status or health / medical information

In order for the Sportradar Platform and the bidding algorithms to optimize for best campaign performance, it is required to include Sportradar Tag Manager within the operators funnel.

Sportradar Tag Manager Tracking Funnel

To be able to run performance-based advertising Sportradar needs to track different signals/events within the user funnel.

The java script events for the integration:

  1. Sportradar Tag Manager implemented and triggered on every page of the betting operator platform (including promotion/landing pages of the creatives).

  2. Registration Start Event implemented and triggered by the betting operator platform.

  3. Registration Finished Event implemented and triggered by the betting operator platform.

  4. Login Event implemented and triggered by the betting operator platform.

  5. First Time Deposit Event implemented and triggered by the betting operator platform.

  6. Recurring Deposit Event implemented and triggered by the betting operator platform.

  7. Bet Placed/Casino Game Placed Event implemented and triggered by the betting operator platform.

  8. Match Page/Casino Game Page Event implemented and triggered by the betting operator platform.

  9. Bet Slip/Casino Game Launch Event implemented and triggered by the betting operator platform.

Integration based on the Sportradar Product

Funnel Summary

Description

Events

Programmatic

Paid Social

Sign- up funnel

Required for optimizing & attributing acquisition campaigns

Tag Manager

Required

Required

Registration Start

Required

Required

Registration Finished

Required

Required

First Time Deposit

Required

Required

Existing customer behavior

Required for excluding or re-targeting existing customers

Login

Required

Required

Recurring Deposit

Required

Required

Bet Placed/ Casino Game Placed

Optional

Optional

Dynamic Creative Personalization

Required ONLY for utilizing personalized creative recommendations

Match Page/ Casino Game Page

Optional

Optional

Bet Slip /Casino Game Launch

Optional

Optional

Explanation of the funnel and how to trigger the Sportradar Tracking Events

1. As the Tag Manager is loaded/triggered on every page of the website (including promotion/landing pages of the creatives), Sportradar automatically triggers page view event and builds run of site audience.

To implement the Sportradar Tag Manager on your website copy following JavaScript code and paste it as close to the opening <head> tag as possible on every page of your website, replacing UNIQUE Client ID which will be provided by Sportradar.

Feel free to use Google Tag Manager for this integration instead of implementing the code in the head of your website, if it is better for your platform. Our code is tested and approved for the integration through Google Tag Manager.

<script> 
(function (a, b, c, d, e, f) {
 a[e] = a[e] || [];
 a.x = b.createElement(c);
 a.y = b.getElementsByTagName(c)[0];
 x.src = d + "?id=" + f;
 x.setAttribute("data-srtmn", e);
 y.parentNode.insertBefore(x, y);
})(
 window,
 document,
 "script",
 "https://tm.ads.sportradar.com/dist/tag-manager.js",
 "srtmCommands",
 "UNIQUE Client ID"
);</script> 

2. Please trigger the Registration Start event as the user starts filling out some registration form (after he typed in name or having some interaction with your registration form) if possible, it should not be triggered just on visiting the registration page. If the entering the registration page is the only one solution you have, please proceed like that.

<script>
srtmCommands.push({
 event: "track.user.registration",
 payload: { action: "start" },
});
</script>

3. Immediately as the user finishes the registration on the page, please trigger the Registration Finished event with the player/user ID on it.

<script> 
srtmCommands.push({
 event:
"track.user.registration",
 payload: { action: "complete", 
userId: "" },
});
</script> 

4. After the successful Login, please trigger the Login event with the player/user ID on it.

<script> 
srtmCommands.push({
 event: "track.user.login",
 payload: { action: "complete", 
userId: "" },
});
</script> 

5. Immediately as the user finish the first time deposit on the page, please trigger the First Time Deposit event with the player/user ID, transactionId, amount, currency on it.

<script> 
srtmCommands.push({
 event: "track.betting.deposit",
 payload: {
 action: "created",
 label: "first_deposit",
 userId: "",
 transactionId: "",
 amount: "",
 currency: "",
 },
});
</script>

6. Immediately as the user finish the recurring deposit on the page, please trigger the Recurring Deposit event with the player/user ID, transactionId, amount, currency on it.

<script> 
srtmCommands.push({
 event: "track.betting.deposit",
 payload: {
 action: "created",
 userId: "",
 transactionId: "",
 amount: "",
 currency: "",
 },
});
</script> 

7. Immediately as the user spends money on the casino game or places a bet slip ticket, please trigger the specified Bet Placed/Casino Game Placed event with parameter listed below.

<script>
srtmCommands.push({
 event: "track.betting.betPlaced",
 payload: {
 userId: "",
 transactionId: "",
 amount: "",
 currency: "",
 contentIds: [""],
 },
});
</script>

8. Immediately as the user visits a specific match page, please trigger the specified Match Page event with parameter listed below. (for Sports)

<script> 
srtmCommands.push({
 event: "srt.retargeting",
 payload: {
 sportsEvent: {
 match_id: "",
 sr_match_id: "",
 team_home_name: "",
 team_home_name_short: "",
 team_home_logo: "",
 team_away_name: "",
 team_away_name_short: "",
 team_away_logo: "",
 scheduled: "",
 status: "",
 tournament_name: "",
 sport: "",
 odds_home: "",
 odds_draw: "",
 odds_away: "",
 language: "",
 },
 },
});
</script>

8. Immediately as the user opens/visits casino games subpage, please trigger the specified Casino Game Page event with parameter listed below. (for Casino)

<script>
srtmCommands.push({
 event: "srt.retargeting",
 payload: {
   casinoEvent: {
     game: {
       id: "",
       name: "",
       category: "",
       image: " ",
       provider: {
         id: "",
         game_id: "",
       },
       jackpot:{
         size:,
         currency_code:"",
       }  
     },
     event: {
       type: "page_view",
     },
     version: "1-0-0",
   },
 },
});
</script>

8. Immediately as the user opens/visits casino games subpage, please trigger the specified Casino Game Page event with parameter listed below. (for Casino, without Jackpot)

<script>
srtmCommands.push({
 event: "srt.retargeting",
 payload: {
   casinoEvent: {
     game: {
       id: "",
       name: "",
       category: "",
       image: " ",
       provider: {
         id: "",
         game_id: "",
       }
     },
     event: {
       type: "page_view",
     },
     version: "1-0-0",
   },
 },
});
</script>

9. Immediately as the user selects a casino game for playing/launches a game, please trigger the specified Casino Game Launch event with parameter listed below. (for Casino)

<script>
srtmCommands.push({
 event: "srt.betslip",
 payload: {
   casinoEvent: {
     game: {
       id: "",
       name: "",
       category: "",
       image: " ",
       provider: {
         id: "",
         game_id: "",
       },
       jackpot:{
         size:,
         currency_code:"",
       }  
     },
     event: {
       type: "page_view",
     },
     version: "1-0-0",
   },
 },
});
</script>

9. Immediately as the user selects a casino game for playing/launches a game, please trigger the specified Casino Game Launch event with parameter listed below. (for Casino, without Jackpot)

<script
srtmCommands.push({
 event: "srt.betslip",
 payload: {
   casinoEvent: {
     game: {
       id: "",
       name: "",
       category: "",
       image: " ",
       provider: {
         id: "",
         game_id: "",
       }
     },
     event: {
       type: "page_view",
     },
     version: "1-0-0",
   },
 },
});
</script>

9. Immediately as the user adds a match to the bet slip, please trigger the specified Bet Slip event with parameter listed below. (for Sports)

<script> 
srtmCommands.push({
 event: "srt.betslip",
 payload: {
 sportsEvent: {
 match_id: "",
 sr_match_id: "",
 team_home_name: "",
 team_home_name_short: "",
 team_home_logo: "",
 team_away_name: "",
 team_away_name_short: "",
 team_away_logo: "",
 scheduled: "",
 status: "",
 tournament_name: "",
 sport: "",
 odds_home: "",
 odds_draw: "",
 odds_away: "",
 language: "",
 },
 },
});
</script>

Parameters to be filled out on the Sportradar Tracking Events

Please provide values (dynamically) on the below listed required parameters depending on the each event structure of the registration finished, login, first time deposit, recurring deposit, match page, bet slip and bet placed events. The values need please to be provided without brackets or special characters.

Sports REQUIRED

  • userId: "ID OF SPECIFIC USER"

  • contentIds: [“ARRAY OF MATCH IDs OR CASINO GAME IDs”]

  • match_id: "ID OF A SPECIFIC MATCH"

  • team_home_name: "HOME TEAM NAME"

  • team_away_name: "AWAY TEAM NAME"

  • scheduled: "DATE AND TIME IN FORMAT ISO 8601"

  • tournament_name: "NAME OF THE TOURNAMENT"

  • sport: "NAME OF THE SPORT" Supported sports list

  • odds_home: "NUMBER AS STRING"

  • odds_draw: " NUMBER AS STRING OR EMPTY STRING IF IMPOSSIBLE"

  • odds_away: " NUMBER AS STRING "

  • language: "ISO 639-1 STANDARD LANGUAGE CODE"

Casino REQUIRED

  • userId: "ID OF SPECIFIC USER"

  • contentIds: [“MATCH IDs OR CASINO GAME IDs”]

  • id: "ID OF THE GAME"

  • name: "NAME OF THE GAME"

  • category: "CATEGORY OF THE GAME"

  • image: "URL LINK WITH IMAGE OF THE GAME"

  • jackpot.size: "JACKPOT AMOUNT CURRENTLY AVAILABLE" (If you have jackpot on your game please use event with jackpot)

  • jackpot.currency_code: "CURRENCY OF JACKPOT" (If you have jackpot on your game please use event with jackpot)

On top please provide values (dynamically) on the below listed optional parameters, depending on the event structure of the registration finished, login, first time deposit, recurring deposit, match page, bet slip and bet placed events. If you are not able to support those optional parameters, please just leave those EMPTY (DON’T DELETE) within the specified event script.

Sports OPTIONAL

  • amount: "AMOUNT BEING SPEND OR DEPOSITED"

  • currency: "ISO 4217 CURRENCY CODE"

  • transactionId: "ID OF SPECIFIC TRANSACTION"

  • sr_match_id: "IF NOT PRESENT PASS EMPTY STRING’

  • team_home_name_short: "SHORT OF HOME TEAM NAME"

  • team_home_logo: "URL LINK WITH LOGO OF HOME TEAM"

  • team_away_name_short: "SHORT OF AWAY TEAM NAME"

  • team_away_logo: "URL LINK WITH LOGO OF AWAY TEAM"

  • status: "NOT STARTED; LIVE; CLOSED; POSTPONED; CANCELED"

Casino OPTIONAL

  • amount: "AMOUNT BEING SPEND OR DEPOSITED"

  • currency: "CURRENCY" 3 letter ISO

  • transactionId: "ID OF SPECIFIC TRANSACTION"

  • provider.id: ''ID OF THE PROVIDER''

  • provider.game_id: "ID OF THE GAME FROM PROVIDER"

Values how those should be send (PLEASE LOOK INTO EXAMPLES):

Property name

Entity

Type

Required

Example

userId

event

String

yes

player1

amount

event

Number as String

no

100

currency

event

String 3 letter ISO

no

EUR = ISO 4217 currency codes as a string

transactionId

event

String

no

transaction1

contentIds

event

String

yes

match or casino game ID ["98378","84730","89478"]

language

event

ISO 639-1 String

yes

en

match_id

event

String

yes

25407104

id (Casino)

event

String

yes

Cleopatra

name (Casino)

event

String

yes

Cleopatra or 1000 Diamond Bet Roulette

category (Casino)

event

String

yes

Slots, Jackpot, Bingo or an empty string if not available

Image (Casino)

event

String

yes

URL Link with Image of the Casino Game

sr_match_id

event

String

no

sr: match:25407104 or an empty string if not available

team_home_name

team

String

yes

FC Bayern München

team_home_name_short

team

String

no

FCB or an empty string if not available

team_home_logo team

team

String

no

https://example.com/logo.png or an empty string if not available

team_away_name

team

String

yes

FC Schalke 04

team_away_name_short

team

String

no

S04 or an empty string if not available

team_away_logo

team

String

no

https://example.com/logo.png or an empty string if not available

scheduled

event

ISO 8601

yes

Example: 2020-09-18T18:30:00+00:00

DateTime as String

status

event

String

no

not_started | live | closed | postponed | cancelled

tournament_name

event

String

yes

Bundesliga (Germany)

sport

event

String

yes

soccer (as stated in Supported sports list)

odds_home

odds

Number as String

yes

5.750

odds_draw

odds

Number as String

yes

4.750 or an empty string if a draw is not possible

odds_away

odds

Number as String

yes

1.450

provider.id

event

String

no

provider1

provider.game_id

event

String

no

Cleopatra

jackpot.size

event

Integer

no

100

jackpot.currency_code

event

String 3 letter

no

EUR = ISO 4217 currency codes as a string

Sportradar Tag Manager Code Information

<script> (function (a, b, c, d, e, f) {  a[e] = a[e] || [];  a.x = b.createElement(c);  a.y = b.getElementsByTagName(c)[0];  x.src = d + "?id=" + f;  x.setAttribute("data-srtmn", e);  y.parentNode.insertBefore(x, y);})(  window,  document,  "script",  "https://tm.ads.sportradar.com/dist/tag-manager.js",  "srtmCommands",  "UNIQUE Client ID");</script>  a = windowb = document c = "script"d = "https://tm.ads.sportradar.com/dist/tag-manager.js" e = "srtmCommands"f = "STM-XXXXXX"  (client ID) 

Why do we structure it like this?

Just to save some space inside the script for the code not to be too long.

What is our tag manager doing?

The tag manger is creating a dom element "script", with src https://tm.ads.sportradar.com/dist/tagmanager.js and the commandsList name inside one data attribute - srtmCommand

We create also an array with the name srtmCommands which includes all the commands an „user“ is sending.

As the script is loaded, this array will be processed, it’s a buffer.

This is a common workflow for saving space and asynchronous javascript-files loading.

How do you test if the events are sent to Sportradar?

After you executed the event, you need to type in your browser console srtmCommands (global variable of Sportradar Tag Manager) and you will see all executed events from your testing flow.

Example:

Last updated

Was this helpful?