LogoLogo
  • Welcome!
  • MOBILE SDK
    • iOS
      • SnapOdds Operator
        • Installation
        • Initialization
        • Snapping Games
        • Customization
        • API documentation
      • SnapOdds Sport Media
        • Installation
        • Initialization
        • Snapping Games and Presenting Odds
        • Customization
        • API documentation
    • Android
      • SnapOdds Operator
        • Installation
        • Initialization
        • Permissions
        • Snapping Games
        • Customization
        • API documentation
      • SnapOdds Sport Media
        • Installation
        • Initialization
        • Permissions
        • Snapping Games and Presenting Odds
        • Customization
        • API documentation
    • React Native
      • iOS Installation
      • Android Installation
      • SnapOdds Operator
        • Initialization
        • Snapping Games
        • Customization
      • SnapOdds Sport Media
        • Initialization
        • Snapping Games and Presenting Odds
        • Customization
  • Web SDK
    • JavaScript
      • SnapOdds Operator
        • Installation
        • Access Token Handling
        • Snapping Games
        • Customization
        • API documentation
      • SnapOdds Sport Media
        • Installation
        • Access Token Handling
        • Snapping Games and Presenting Odds
        • Customization
        • API documentation
      • Implementation Errors
  • Integration Guide
    • SnapOdds as Button
    • SnapOdds as Banner
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Web SDK
  2. JavaScript
  3. SnapOdds Operator

Installation

Installing the JavaScript SDK.

To set up the JavaScript SDK two files must be made available:

  • JavaScript resource

  • CSS resource

Both files must be added to your web application's index.html. These files are made available via CDN (Content Delivery Network). The following code can be copied and pasted to access the CDN and obtain the SDK.

<link href="https://cdn.snapodds.com/sdk/v1/snapodds-sdk.css" type="text/css" rel="stylesheet">
<script src="https://cdn.snapodds.com/sdk/v1/snapodds-sdk.js" type="text/javascript"></script>

The SDK must be presented on the whole viewport. For this reason, the following styles must be added. If you already have overlaying elements rendered inside your page, please adjust your z-index accordingly.

<style type="text/css">
  snapodds-sdk {
    z-index: 1;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
  }
</style>

PreviousSnapOdds OperatorNextAccess Token Handling

Last updated 3 years ago

Was this helpful?