Send Events Using the SDK
Send events to Gameball to power actions, campaigns, and rewards. Events represent significant customer actions within your app—such as purchases, product interactions, or engagement milestones.Event Parameters
Unique identifier for the customer performing the event.
Name of the event (e.g.,
"purchase", "review", "add_to_cart").Extra contextual information about the event (amount, product details, category, etc.).
Optional session token to override the global token for this specific request.
Validation Rules
An event requires:- Customer ID is not empty
- Event name must be provided
- At least one metadata entry
- Metadata values must be valid primitive types or objects
Best Practices
1
Use Clear Event Names
Make event names human-readable and consistent (e.g.,
purchase_completed, review_submitted).2
Send After Action Completion
Only send events when the action is fully completed (e.g., after successful payment confirmation).
3
Include Relevant Metadata
Add metadata that supports segmentation and campaign targeting.
4
Keep Metadata Keys Consistent
Use consistent naming across events (e.g., always
amount, not sometimes price).Common Event Examples
1. Purchase Event
2. Review Event
3. Add to Cart Event
Events are the foundation of Gameball’s reward and engagement engine. Configure event triggers and reward rules from your Gameball dashboard.