Digitain (OUTDATED)
IFRAME INTEGRATION
In order to integrate Sport’s iFrame, Partner should reference the https://{PARTNERNAME}.betadigi.com/js/Partner/IntegrationLoader.js file to his webpage in <head></head> section.
Important: there should be a div element with sport_div_iframe ID.
Example:
<div id='sport_div_iframe'></div>
Insert this block of JavaScript code to your page and replace script parameters. This code will generate the iFrame:
IFRAME INTEGRATION CODE
var _sp = _sp || [];
_sp.push(['server', 'http://{PARTNERNAME}.betadigi.com/']);
_sp.push(['token', '-']);
_sp.push(['language', 'en']);
_sp.push(['login', 'SportLogin']);
_sp.push(['registration', 'SportRegistration']);
_sp.push(['currentPage', 'Home']);
_sp.push(['device', 'd']);
_sp.push(['timeZone', '4']);
_sp.push(['eventId', '2381829']); ^ _sp.push(['champId', '18573']);
_sp.push(['unHideOverflow', true]);
SportFrame.frame(_sp);
Explanation of Parameters:
- _sp.push(['server', 'http://{PARTNERNAME}.betadigi.com/']) – Digitain’s server which is provided by us.
- _sp.push(['token', '-']) – default value of the parameter is '-'. A token must be generated by an algorithm that was agreed beforehand and should be placed instead of '-' in case if the user is logged in.
- _sp.push(['language', 'en']) – iframe will be displayed in the language set in this parameter. Languages’ codes list:
Russian ru
English en
Armenian hy
Turkish tr
Bosnian bs
Farsi fa
Arabic (Iraq) ar
Serbian sr
Croatian hr
Ukrainian uk
Kurdish ku
Hebrew he
Spanish es
Portuguese pt
Italian it
French fr
German de
Korean ko
Danish da
Finnish fi
Czech cs
Swedish sv
Georgian ka
Norwegian no
Chinese zh
Chinese Traditional zh-CHT
Thai th
Kazakh kk
- _sp.push(['login', 'SportLogin']) – this is a JavaScript function name provided by partner beforehand, which can be called by sportsbook when log in is required. After login and logout the page must be refreshed.
- _sp.push(['registration', 'SportRegistration']) - this is a JavaScript function name provided by partner beforehand, which can be called by sportsbook when registration is required.
- _sp.push(['currentPage', 'Home']) - this is a parameter indicating a page that was requested. The possible pages: Home | Upcoming | EventView | Results | UpcomingDetails | Calendar | MultiView | Overview.
- _sp.push(['device', 'd']) – for desktop version calls 'd' and 'm' for mobile version.
- _sp.push(['timeZone', '4']) – if you set this parameter you will be able to see the events in corresponding time zone. The parameter is not mandatory. In case of not setting the parameter the events will appear in your local time zone.
- _sp.push(['eventId', '2381829']) – by setting the eventId the exact event will appear in prematch or inplay depending on event status. The parameter is not mandatory but it cannot be used together with champId, these two parameters are mutually exclusive. In order to get a specific event link, Partner should go to the event page, press Ctrl+C without making any selections. The copied link in the clipboard has the following structure:
- https://{PARTNERDOMAIN}/Sport/UpcomingDetails/{EVENTID} for PreMatch
- https://{PARTNERDOMAIN}/Sport/EventView/{EVENTID} for In-Play
The Partner should configure corresponding routing by calling IFRAME
INTEGRATION CODE with the parameters included in the link.
...
_sp.push(['currentPage', 'UpcomingDetails' | 'EventView']);
...
_sp.push(['eventId', '{EVENTID}']);
- _sp.push(['champId', '18573']); – by setting the champId the exact championship will appear in prematch. The parameter is not mandatory but it cannot be used together with eventId, these two parameters are mutually exclusive. In order to get a specific championship link, Partner should go to the championship page, press Ctrl+C without making any selections. The copied link in the clipboard has the following structure:
https://{PARTNERDOMAIN}/Sport/Upcoming/{CHAMPID}
The Partner should configure corresponding routing by calling IFRAME INTEGRATION CODE with the parameters included in the link.
...
_sp.push(['champId', '{CHAMPID}']);
- _sp.push(['unHideOverflow', true]) – by setting this parameter value to “true”, css property “overflow: hidden” will not be applied on any of these pages (Upcoming, Event View, Results, Upcoming Details, Calendar, Multi View, Overview). If the parameter is not defined or is set to “false”, the property will be applied on all mentioned pages. For Home page the property is not set.
Important: After calling SportFrame.frame(_sp) function, the sport iFrame will be built up by these parameters, in the <div> mentioned above.
When the iFrame is fully loaded, it is possible to open iFrame menu items from outside the iFrame without reloading the iFrame, by calling SportFrame.openPage(currentPage) function.
Our example
<script type="text/javascript" src="<?=$url_js_to_build_iframe;?>"></script>
<script type="text/javascript">
var _sp = _sp || [];
_sp.push(['server', '<?=$server;?>']);
_sp.push(['token', '<?=$token;?>']);
_sp.push(['language', '<?=$language;?>']);
_sp.push(['login', '<?=$login;?>']);
_sp.push(['registration', '<?=$registration;?>']);
_sp.push(['currentPage', '<?=$currentPage;?>']);
_sp.push(['device', '<?=$device;?>']);
//_sp.push(['timeZone', '4']);
//_sp.push(['eventId', '2381829']);
//^ _sp.push(['champId', '18573']);
_sp.push(['unHideOverflow', <?=$unHideOverflow;?>]);
SportFrame.frame(_sp);
var iframe = document.getElementById('sport_div_iframe');
if(document.getElementById('iframe')) {
document.getElementById('iframe').appendChild(iframe);
} else {
document.getElementById('gameholder').appendChild(iframe);
}
</script>
<div id='sport_div_iframe'></div>