Skip to main content
Send your customer’s events on your platform to Gameball, along with any metadata that describes the event. Depending on your Gameball programs configuration, the customers can be rewarded based on the sent events. Customer events can be sent to Gameball via the Track Events API.

What are Events?

Every Track Event call records a single user action. We call these “events”. We recommend that you make your event names human-readable, so that everyone can know what they mean instantly. Event metadata are extra pieces of information you can tie to events you track. They can be anything that will be useful while designing your program.
Tracked events can be UI events or server side events depending on how you would like to design your programs.

Event Tracking Benefits

Tracking events allows you to:
  1. Gain insights into what your customers are doing on your platform
  2. Reward actions in real-time to drive more engagement
  3. Personalize experiences based on customer interests and behaviors

How Gameball Event Engine Works

Gameball listens to your system, takes note of your customers’ actions, and uses that data to trigger rewards or personalized messages.
1

Send Event Data

Send customer events to Gameball via API calls with relevant metadata
2

Gameball Processing

Gameball processes the events and checks against your configured reward rules
3

Trigger Rewards

Based on your program configuration, rewards and notifications are triggered

Example: E-commerce Event Tracking

Let’s say you run an online store and want to reward customers when they add items to their carts.

Basic Add to Cart Event

When a customer clicks “Add to Cart”, you can send a simple event to Gameball:
curl -X POST 'https://api.gameball.co/v4.0/events' \
  -H 'Content-Type: application/json' \
  -H 'APIKey: YOUR_API_KEY' \
  -H 'TransactionKey: YOUR_TRANSACTION_KEY' \
  -d '{
    "events": {
      "add_to_cart": {}
    },
    "customerId": "CUST_ID"
  }'

Enhanced Add to Cart Event

If you want to go further, add details like product ID, price, and category:
curl -X POST 'https://api.gameball.co/v4.0/events' \
  -H 'Content-Type: application/json' \
  -H 'APIKey: YOUR_API_KEY' \
  -H 'TransactionKey: YOUR_TRANSACTION_KEY' \
  -d '{
    "events": {
      "add_to_cart": {
        "product_id": "231402",
        "product_title": "iPhone 12",
        "price": 1350.00,
        "category": "Electronics",
        "quantity": 1
      }
    },
    "customerId": "CUST_ID"
  }'

Common Event Types

E-commerce Events

  • add_to_cart
  • view_product
  • purchase
  • wishlist_add

User Engagement

  • signup
  • login
  • profile_update
  • newsletter_subscribe

Content Interaction

  • video_watch
  • article_read
  • download
  • share

Custom Events

  • Any custom event name
  • Business-specific actions
  • Platform-specific behaviors

Event Metadata Best Practices

1

Use Descriptive Names

Make event names human-readable and descriptive:✅ Good: product_viewed, checkout_started, review_submitted❌ Bad: evt1, action_a, click_btn
2

Include Relevant Metadata

Add useful information that can be used for targeting and analytics:
{
  "events": {
    "product_viewed": {
      "product_id": "12345",
      "category": "Electronics",
      "price": 299.99,
      "brand": "Apple"
    }
  }
}
3

Be Consistent

Use consistent naming conventions and data structures across your events

API Integration

For detailed API implementation, refer to the Events API Reference and Tracking Customer Events tutorial.

Next Steps