Skip to main content
Logo
Explore APIsContact Us
  • Home
  1. Resources
  2. Virtual Stadium
  3. Bet Share

Bet Share

Bet Share Demo

The Bet Share module is a centralized hub for sharing and discovering bets within Virtual Stadium. It allows users to view all shared bets, contribute new ones, and revisit their previously shared bets. This feature enhances community engagement and provides social betting experiences.

#Overview

The Bet Share module enables:

  • Bet Discovery - Browse bets shared by other community members
  • Bet Sharing - Share your own bets with the community
  • Bet History - Access your previously shared bets
  • Social Interaction - Engage with other bettors around shared bets

This module requires adapter integration to function properly and provide betting data.


#Adapter Integration

The Bet Share feature requires adapter integration to function properly. See the appropriate adapter type based on your integration needs:

  • Custom Adapter Implementation
  • Hosted Adapter Configuration

#Activating the Copy Bet Button

To enable the copy bet functionality in the shared bets, you must first integrate and configure the Copy Bet feature. For detailed implementation instructions, see the Copy Bet Feature Documentation.

info

The copy bet button is not visible to the user who originally shared the bet, preventing self-copying and maintaining fair betting practices.


#Tracking Actions

The Bet Share module triggers various actions that can be handled through the onAction callback function for analytics and user behavior monitoring.

#BetslipShareListOpen

Triggered when a user opens the bet share list interface.

type string required

Action type: "BetslipShareListOpen".

data object required

Action data containing channel information.

data.channelId string required

Unique identifier of the chat channel.

#BetslipShareListClose

Triggered when a user closes the bet share list interface.

type string required

Action type: "BetslipShareListClose".

data object required

Action data with scope information.

data.channelId string required

Unique identifier of the chat channel.

data.scope string required

Scope identifier: "chat:betshare:list".

#BetslipShareListBack

Triggered when a user clicks the back button within the bet share interface.

type string required

Action type: "BetslipShareListBack".

data object required

Action data containing channel information.

data.channelId string required

Unique identifier of the chat channel.

#BetslipShareListDisabled

Triggered when a user attempts to open bet share but the feature is disabled.

type string required

Action type: "BetslipShareListDisabled".

data object required

Action data containing channel information.

data.channelId string required

Unique identifier of the chat channel.

Handling Bet Share Actions:

javascript
// Configure onAction callback to handle bet share events
SIR('addWidget', '#virtual-stadium-container', 'virtualStadium', {
    jwt: 'your-jwt-token',
    channelId: 'your-channel-id',
    onAction: function(action) {
        switch(action.type) {
            case 'BetslipShareListOpen':
                // Optional: Log for debugging
                // console.log('Bet share list opened for channel:', action.data.channelId);
                // Track analytics event
                analytics.track('bet_share_opened', {
                    channelId: action.data.channelId
                });
                break;

            case 'BetslipShareListClose':
                // Optional: Log for debugging
                // console.log('Bet share list closed for channel:', action.data.channelId);
                // Track analytics event
                analytics.track('bet_share_closed', {
                    channelId: action.data.channelId,
                    scope: action.data.scope
                });
                break;

            case 'BetslipShareListBack':
                // Optional: Log for debugging
                // console.log('User navigated back in bet share');
                // Track analytics event
                analytics.track('bet_share_back', {
                    channelId: action.data.channelId
                });
                break;

            case 'BetslipShareListDisabled':
                // Optional: Log for debugging
                // console.log('Bet share attempted but disabled');
                // Track analytics event
                analytics.track('bet_share_disabled', {
                    channelId: action.data.channelId
                });
                break;
        }
    }
});

#Customization

shareNewBetButtonPosition 'top' | 'bottom' optional

Controls position of the "Share New Bet" button. Default is 'top'.

share new bet button top position
share new bet button bottom position

Share New Bet Button Position Configuration:

javascript
// Configure the position of the share new bet button
SIR('addWidget', '#virtual-stadium-container', 'virtualStadium', {
    jwt: 'your-jwt-token',
    channelId: 'your-channel-id',
    shareNewBetButtonPosition: 'bottom' // or 'top'
});

Last updated 15 days ago
Is this site helpful?
Virtual Stadium, Moderation, Engagement Tools
Live Match TrackerCopy Bet
On this page
  • Overview
  • Adapter Integration
  • Activating the Copy Bet Button
  • Tracking Actions
  • BetslipShareListOpen
  • BetslipShareListClose
  • BetslipShareListBack
  • BetslipShareListDisabled
  • Customization