UserID
User ID Setup Guide
Overview
When using the UserID & Webhook campaign type, your system must send a unique userid value to identify each game player. This userid is included in the webhook data sent back to your server after each game play.
How It Works
Your website generates or retrieves a
useridfor the current userYour website passes the
useridto the game via URL parameterThe user plays the game
Our system sends the game result (including the
userid) to your Webhook URL
Your Website Branded Mini-Games
| |
|-- userid (via URL parameter) --------->|
| | User plays the game
|<-- Webhook POST (userid + result) -----|Passing the User ID
Add the userid parameter to the game URL when embedding it on your website:
Option 1: Using Your Existing User System (Recommended)
If your website already has a sign-up/login system, use the existing user identifier.
Examples:
Database user ID (e.g.,
12345)Username (e.g.,
james)Email address (e.g.,
james@example.com)Registration number or member ID
Advantages:
Reliable user tracking across devices and sessions
Webhook data can be matched to your user database
No duplicate users
Option 2: Generate a Random ID (No Sign-up Required)
If your website does not have a user system, you can generate a unique ID and store it in the browser.
Advantages:
No sign-up system needed
Quick to implement
Returning users keep the same ID
Limitations:
If the user clears browser data or uses incognito mode, a new ID is generated
Cannot track the same user across different devices or browsers
Not suitable when accurate user identification is required
Webhook Response Data
After each game play, the following data is sent to your Webhook URL via POST:
userid
Unique user identifier sent by your system
james or f47ac10b-58cc...
tx_id
Unique transaction ID for each game play
234234
time
Date and time when the user played the game
2025-04-10 06:39:23
score
Score the user achieved
3500
playtime
Play duration in seconds
20
Return Code
Your server must return one of the following codes after receiving the webhook:
S
Success
F
Failure. You may include a reason, e.g., F: Score is missing.
Which Option Should I Choose?
Best for
Loyalty programs, rewards, personalized experiences
Promotions, contests, casual engagement
User tracking
Accurate, cross-device
Browser-only, may create duplicates
Implementation
Requires existing auth system
Simple, no backend needed
Webhook data matching
Can match to your user database
Limited to browser session
Integration with WordPress
If your website runs on WordPress, you can automatically pass the logged-in user's ID to the game iframe using plugins.
Recommended Plugins
Supports url_forward_parameter to forward URL parameters to the iframe
Automatically appends URL parameters to any iframe with id="rwcGetParams"
Example: Passing WordPress User ID
Add this to your theme's functions.php to create a shortcode that outputs the game iframe with the current user's ID:
Then use the shortcode in any page or post:
Integration with Auth Services (No Existing User System)
If your website does not have a user system, you can use a third-party authentication service to add signup/login and obtain a user ID.
Recommended Services
Example: Firebase Auth
Example: Supabase Auth
Which Service Should I Choose?
Easiest setup
Best
Good
Good
Moderate
Pre-built UI
Yes (React, JS)
Yes (FirebaseUI)
No (build your own)
Yes (Universal Login)
Social login
Google, GitHub, etc.
Google, Facebook, etc.
Google, GitHub, etc.
60+ providers
Best for
React/Next.js sites
Any website
Developers wanting open-source
Enterprise needs
Last updated