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:
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.
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:
To implement the Sportradar Tag Manager on your website copy following JavaScript code and paste it as close to the opening 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);
<script>
srtmCommands.push({
event: "track.user.registration",
payload: { action: "start" },
});
</script><script>
srtmCommands.push({
event:
"track.user.registration",
payload: { action: "complete",
userId: "" },
});
</script> <script>
srtmCommands.push({
event: "track.user.login",
payload: { action: "complete",
userId: "" },
});
</script> <script>
srtmCommands.push({
event: "track.betting.deposit",
payload: {
action: "created",
label: "first_deposit",
userId: "",
transactionId: "",
amount: "",
currency: "",
},
});
</script><script>
srtmCommands.push({
event: "track.betting.deposit",
payload: {
action: "created",
userId: "",
transactionId: "",
amount: "",
currency: "",
},
});
</script> <script>
srtmCommands.push({
event: "track.betting.betPlaced",
payload: {
userId: "",
transactionId: "",
amount: "",
currency: "",
contentIds: [""],
},
});
</script><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
<script>
srtmCommands.push({
event: "srt.retargeting",
payload: {
casinoEvent: {
game: {
id: "",
name: "",
category: "",
image: " ",
provider: {
id: "",
<script>
srtmCommands.push({
event: "srt.retargeting",
payload: {
casinoEvent: {
game: {
id: "",
name: "",
category: "",
image: " ",
provider: {
id
<script>
srtmCommands.push({
event: "srt.betslip",
payload: {
casinoEvent: {
game: {
id: "",
name: "",
category: "",
image: " ",
provider: {
id: "",
<script
srtmCommands.push({
event: "srt.betslip",
payload: {
casinoEvent: {
game: {
id: "",
name: "",
category: "",
image: " ",
provider: {
id: "",
game_id: "",
}
},
event: {
type: "page_view",
},
version:
<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
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.
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.
<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(xWhy 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:
| 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 |
| 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 |
| 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 |