Bet Tracker Implementation Guide

Implementation Guide

If you're interested in learning more about our widgets, please contact us for a custom quote.

Get Access

Contact sales to get started ‒ they'll get you on the right path for getting the Bet Tracker up and running!

What we'll need:

  1. The domain name(s) you would like to use our widgets on (these will be whitelisted). You can add any number of domains, contact sales to add more.
  2. Your API keys from SharpSports. Please see below for more information

Register With SharpSports

Once you have widget access, head over to SharpSports and create an account there. Then once you have logged in to your SharpSports account, go to the Settings section and grab your API keys. Please take note of which one is the Private and Public key.

Note: We only need your API keys from SharpSports. No other configuration is required on their site.

Configure Your API Keys

Next you'll want to configure your API keys. Scroll down to the Bet Tracker widget and click 'Configure'. You will see configuration values for the Private and Public key. Please place the correct keys here and click save.

We need these to be able to link bettor accounts to the widget, so if these are incorrect, or your don't have them, the widget will not work!

Build Your Widget

Once your API keys are configured, you're ready to start building the widget! From the widget dashboard, click the Builder link under the Bet Tracker Widget. If the builder link is not available contact sales and they can configure it for you.

Please see Developer Notes below for different states of the widget!

Use the Widget!

Once you've built the snippet for your widget using the widget builder page, simply add this javascript reference to your site and place the widget wherever you'd like it to display!

JavaScript Reference (required)

<script src="https://sportsdata.io/assets/widgets/js/widgets.js" type="text/javascript"></script>

Example Widget Snippet

<fdw-bet-tracker client="{YOUR CLIENT ID}" user-id="{INTERNAL USER ID}"></fdw-bet-tracker>

Note: the client parameter will automatically be set by the widget builder page and the league will be dependent on which leagues sales has configured for you.

All Done

Congratulations! You're all set to start using widgets. Feel free to contact support if you run into any issues and we hope you enjoy using our widgets!

Widget Parameters

User-Id


The user-id should be passed into the widget as a string.
When the a user links a sportsbook, the user-id is passed and stored as a unique bettor id. This is what we use to store and retrieve a bettors linked accounts and bet slips.
It is very important that this field is unique. We recommend passing in a unique id from your database that will never be replicated. We strongly advise against using emails or usernames for this field. It should be completely unique. Failing to do so can result in data integrity issues.

Client-Id


The client-id should be passed into the widget as a string.
This is your SportsDataIO client-id. It should be auto populated when you grab the widget snippet from the builder page.

Widget States

Not Signed In To Site


If the user is not signed in to your site, please leave the user-id attribute blank.
When the user-id field is left blank, the widget will display a demo state that does not allow any user interaction. Passing a static value into this field can cause data issues!
The 'Link Sportsbooks' button will be inactive
Alternatively, you can choose to not display the widget at all when a user is not logged into your site.

Signed Into Site, But No Books Linked


If the user is signed into your site, pass a unique site id for the user into the user-id attribute.
If the specified user-id is not found to have any linked sportsbook, the widget will appear in a demo state, but will allow that user to link their sportsbooks ('Link Sportsbooks' button will be active).
The user-id attribute is what is used to retrieve the user's betting information each time they are logged into your site. Therefore it is important to use a value that is unique per user and does not change. We do not recommend using an email address or username.
Example: Use the user's GUID or unique database id for the user-id attribute

Signed Into Site, Books Linked

This would be the same case as above, but now the user has linked books, so they will be shown their bets.