Sports Widget
Shows the top matches of your sportsbook on any page of your site. When the player clicks a match or an odd, they are sent to your sports page opened on that match.
Preview
The live preview on this page shows the widget with Digitain and First, in any of the supported currencies.
Load the widget to see how it looks with each sportsbook and currency.
Click a match or an odd to see the URL your sports page receives.
Installation
Add the container where the widget must appear. The id is required and must be exactly content360-sports-widget.
<div id="content360-sports-widget"></div>
Declare the configuration before loading the script. In sportsbook set the provider you have enabled: "digitain" or "first".
<script>
window.Content360Sports = {
client: 5,
sportsbook: "digitain",
lang: "es_ES",
currency: "ARS",
sportsUrl: "/sports"
};
</script>
Load the script.
<script src="https://sportsbook.content360.games/js/sports-landing-loading.v2.js" async></script>
Options
| Option | Description |
|---|---|
client | Required. Your numeric client ID (given by Content360). |
sportsbook | Required. Enabled provider: "digitain" or "first". |
sportsUrl | Required. Path of your site that opens the sportsbook, e.g. "/sports". A full URL also works. |
lang | Language in xx_XX format (es_ES, en_US, pt_BR…). Default en_US. |
currency | ISO currency code. Default USD. |
skin | Optional. Widget colors, in the same format as the skin you send in extra_data on game launch (see Customization). |
Redirection to your sportsbook
When the player clicks a match, the browser goes to sportsUrl with these parameters (only the ones that apply):
| Parameter | Provider | Description |
|---|---|---|
sportsbook | Both | digitain or first |
event | Both | Event ID (or championship ID when type=3) |
type | Digitain | Page to open: 1 pre-match, 2 live, 3 championship |
sport | Digitain | Sport ID (only with type=3) |
country | Digitain | Country ID (only with type=3) |
odd | First | ID of the selection the player clicked |
Examples:
https://yoursite.com/sports?sportsbook=digitain&type=1&event=41867425
https://yoursite.com/sports?sportsbook=first&event=123456&odd=987654
Your sports page must read these parameters (except sportsbook) and send them as they are inside extra_data on game launch:
"extra_data": { "type": "1", "event": "41867425" }
If you prefer to handle the navigation yourself, listen to this event and call preventDefault():
window.addEventListener("content360-sports:navigate", function (e) {
e.preventDefault();
console.log(e.detail.url, e.detail.params);
});