Integration

Sportsbook can be implemented by loading a Javascript file provided by cmswager and including a container div in client webpage.

Example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">

</head>
  <body>
    <div id="appcontent"></div>
</body>
<script src="https://testsportsbook.cmswager.com/js/sportsbook.js"></script>
<script>
(function() {      
    cmsSportbook.startSportbook("desktop","guest","en-US","clientKey","defaultpage");
})();
</script>
</html>

Important! The container div must have the "id" property setted to "appcontent" mandotory. The CmsWager sportsbook will be generated inside the container div.

The method "startSportbook" accept 4 parameters:

Name
Type
Description

platform

string

Sportsbook content view type. It can be "desktop", "mobile" or "tablet"

token

string

User token obtained from user authentication (see Cmswager api section). Use "guest" for unauthenticated users

culture

string

Display culture language. For available languages please see the specific section.

clientKey

string

Client key provided by CmsWager

defaultpage

string

Starting page. It can be "sport", "sportmenu" or "live".

Last updated