Related articles:
Member access and login, Member opt-in and enrollment, On-site widgets
How it works
- You retrieve user information from your authenticated session
- You create an encrypted digest on the server using the user’s ID and email
- You pass the digest and user info to the Cevoid widget div code
- Cevoid verifies the digest and authenticates the user
Set up custom customer authentication
Step 1: Enable custom customer authentication
- Navigate to Settings -> Rewards program -> General
- Under Access and enrollment, set Authentication to Custom customer authentication
- Copy your encryption key and tracking ID from this page
Step 2: Get your widget embed code
- Navigate to Rewards program -> On-site widgets
- Select the widget you want to embed
- Click Embed in the top right corner
- Copy the div code
Step 3: Add user information to the embed code
Add the following data attributes with your authenticated user’s information:| Attribute | Required | Description |
|---|---|---|
data-user-email | Yes | The user’s email address |
data-user-id | Yes | The user’s ID in your system |
data-user-name | No | The user’s display name |
Step 4: Create the digest
The digest authenticates the user and must be generated server-side. Payload format:{{ USER_ID }},{{ EMAIL }}
For example, for a user with ID 1234 and email [email protected], the payload is:
Step 5: Add the digest to the embed code
Add the generated digest asdata-digest:
Complete example
For a user with:- ID:
1234 - Email:
[email protected] - Name:
Viktor
