Run CustomerGlu offers, campaigns, games, and rewards on websites with a simple SDK.

1. Quick Start

  • Include the below script in your HTML file.

<script src=""></script>
  • Create CustomerGlu object right below the script.

<script src=""></script>
var clientId = "CLIENT_ID"; // REQUIRED
var userId = null; // OPTIONAL, uses browser session ID to track user
var glu = new CustomerGlu(clientId, userId); // Initilize CustomerGlu
  • USER_ID is optional if the user has not logged in. A SESSION_ID would be created to track the user.


CodeSandbox -

CodePen -

2. CustomerGlu SDK Configurations

  • A client can specify the following configuration values

export ClientConfig {
launcherExcludeList: [], // Paths where launcher is not shown
fullPageWalletIncludeList: ["/rewards.html"], // Paths where full page wallet should be shown
fullPageWalletHook: "#app", // HTML element that should hold the full page wallet

launcherExcludeList - URLs where you don't want CustomerGlu launcher to show up.

fullPageWalletIncludeList - URLs where you want CustomerGlu to embed its rewards wallet.

fullPageWalletHook - HTML element identifier, place on the page where the CustomerGlu rewards wallet will be shown.


CodeSandBox -

Example Wallet

3. Documentation

1. Class CustomerGlu

1.1 Constructor - CustomerGlu(clientId: string, userId?: string);

1.2 Method: setUserId(userId: string) -

  • In Single Page Application, if userId is available after initializing the SDK, use this method to reset the userId.