Installing Script (Widget)
If you've chosen to used the Jackpot service using the Flows widget then you need to first install the Jackpot Script into your front end.
Installing the script
To connect your website to FlowsPlay, youโll need to add a snippet of code to your website's front-end. This code snippet can be found under your 'Team Settings' and looks like this:
<script type="text/javascript" src="https://cdn.flows.world/js/jackpot-1.0.1.js" id="flows-jackpot"></script>Starting the Jackpot Widget
The flowsJackpots.startJackpotWidget function should be called when you want the jackpot to show for the player. This would typically be done when the user opens a game window. The following parameters are used when starting the game widget:
<script>
flowsJackpots.startJackpotWidget({{SiteId}}, "{{GameId}}", "{{PlayerId}}", "{{locale}}", "{{StartingPosition}}", {{DeviceBreakingPoint}});
</script>
| Parameter | Required | Description |
| SiteId | Yes | The site ID retrieved from the FlowsPlay admin panel under Site Settings |
| GameId | Yes | The ID of the game that the jackpot will start for. This will be used to find open jackpots for the game being played and launch the correct Jackpot Widget if the game is currently taking part in a jackpot |
| PlayerId | Yes | The ID of the player starting the game. |
| Locale | No | Optional parameter to specify the locale for the player. If not passed, the players preferred language is taken from their browser settings |
| StartingPosition | No | Optional starting position for the widget passed as css paramaters Top/Bottom and Right/Left pixel offsets. Defaults to: { bottom: "20px", right: "20px" } |
| DeviceBreakingPoint | No | Optional breaking point pixel width used to determine if to load the mobile or desktop variation. Defaults to: 480 |
Closing the game widget
When the user closes the game window, the widget can be closed by calling:
flowsJackpots.closeJackpotWidget();Type your content here.