Skip to content

Get FanFest Running in 5 Minutes

Add live fan engagement to your website in three steps. All you need is a FanFest account with channel admin access and a website to embed on.

Prerequisites

  • A FanFest account with channel admin access. Sign up at fanfest.vip if you don't have one.
  • A website where you can add a script tag and HTML.

Step 1: Add the SDK Script Tag

~30 sec

Add the FanFest SDK to your page by including this script tag before your closing </body> tag:

Versioned (recommended for production):

html
<script src="https://sdk.production.fanfest.vip/1.0.20/fanfest-sdk.js"></script>

Latest (always points to the most recent release):

html
<script src="https://sdk.production.fanfest.vip/latest/fanfest-sdk.js"></script>

TIP

Use a versioned URL in production to avoid unexpected changes. The latest URL is convenient for development.

Step 2: Initialize and Embed

~1 min

Add a container element where you want the FanFest widget to appear, then initialize the SDK with your Web App ID:

html
<div id="fanfest-embed"></div>

<script>
  FanFestSDK.init({
    clientId: 'YOUR_WEB_APP_ID'
  })
</script>

Replace YOUR_WEB_APP_ID with the Web App ID from your FanFest channel settings. You can find it in the SSO Management section of your channel admin dashboard.

That's it -- FanFest is now live on your page. Your visitors will see the full fan engagement experience: shows, contests, chat, and leaderboards.

Step 3: Customize the Look

~3 min

Make the embed match your site by setting a background color:

html
<script>
  FanFestSDK.init({
    clientId: 'YOUR_WEB_APP_ID',
    iframe: {
      backgroundColor: '#1a1a2e'
    }
  })
</script>

Available init options:

OptionTypeRequiredDefault
clientIdstringYes--
apiBasestringNohttps://api.fanfest.vip
appOriginstringNohttps://fanfest.vip
iframe.backgroundColorstringNovar(--color-brand-background)

Want login and rewards callbacks?

With an SSO integration, you can add hostLoginFn and hostRewardsFn callbacks to connect the embed with your site's own login and rewards flows. See Customization Options for details.

For full theming and brand customization, see the Brand Guidelines.

Complete Example

Here is a minimal, copy-paste-ready HTML page with everything wired together:

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>My Site with FanFest</title>
</head>
<body>
  <h1>Welcome to My Site</h1>

  <!-- FanFest embed container -->
  <div id="fanfest-embed"></div>

  <!-- FanFest SDK -->
  <script src="https://sdk.production.fanfest.vip/latest/fanfest-sdk.js"></script>
  <script>
    FanFestSDK.init({
      clientId: 'YOUR_WEB_APP_ID',
      iframe: {
        backgroundColor: '#1a1a2e'
      }
    })
  </script>
</body>
</html>

What's Next?

You have a working FanFest embed. From here you can:

See Next Steps for a full comparison of integration tiers.

Released under the MIT License.