Initial Setup
==========
Cloudflare Worker:
Ensure your Worker is deployed with the binding to Analytics Engine.
Plugin Settings:
Go to the Plugins tab in your Bubble editor, select this plugin, and paste your worker's URL into the worker_url field (e.g.,
https://your-worker.user.workers.dev).
How to Use in Workflows:
=====================
Use the "Send Event" action in your workflows (e.g., on page load or button click).
Field Mapping (Schema):
Data is stored in Cloudflare Analytics Engine following this strict order to facilitate SQL queries:
- Event Name: (blob1) - e.g., "view", "add_to_cart", "purchase".
- Seller ID: (blob2) - The Unique ID of the Vendor/Product Owner. (Critical for filtering dashboards).
- User ID: (blob3) - Current User's Unique ID.
- Object ID: (blob4) - The ID of the Product or Order.
- Value: (double1) - Monetary value (e.g., Product Price).
- Quantity: (double2) - Quantity (default is 1).
- Meta: (blob5) - Extra info (e.g., URL, Traffic Source).