Event

Logs analytics data from customers who view products.

POST /api/v1/analytics/event

Rebuy Event Streams

Leverage Rebuy AI's event stream technology to surface smart product and shopping experience recommendations.

📘

Notes

A user (subject) views (action) a t-shirt (noun).

Rebuy will store the event so it can be included in analytics at a later time.

🚧

Generating a client-side UUID

At this time, the client is responsible for generating a UUID to be included with the request.

We recommend using this NPM package (UUID) to generate the UUID.

We also recommend storing this session-based UUID if you plan on using the /products/viewed endpoint.

How to Use the /event Endpoint

  1. Generate a UUID for the customer if one hasn't been created already.
  2. Build your POST data with the appropriate subject, verb, and noun (ex. user, viewed, product) and corresponding product data (ex. shopify_product_handle)
  3. Submit your request when a customer views a product.

Once you've submitted data to this endpoint, you can call the /products/viewed endpoint using the customer's established UUID to get a list of products that they've viewed throughout their session.

Language