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>

 

ParameterRequiredDescription
SiteIdYesThe site ID retrieved from the FlowsPlay admin panel under Site Settings
GameIdYesThe 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
PlayerIdYesThe ID of the player starting the game.  
LocaleNoOptional parameter to specify the locale for the player. If not passed, the players preferred language is taken from their browser settings
StartingPositionNoOptional starting position for the widget passed as css paramaters Top/Bottom and Right/Left pixel offsets.  
Defaults to: { bottom: "20px", right: "20px" }
DeviceBreakingPointNoOptional 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.

Was this article helpful?