Action Types
All available action_type values and their use cases.
Frontend events
| Action Type | Description | Page |
|---|---|---|
homepage_view | User visits homepage | Homepage |
product_view | User views a product | Product page |
category_view | User browses category | Category page |
add_to_cart | User adds to cart | Product/Cart |
order | User completes purchase | Thank you page |
subscribe | User subscribes | Newsletter form |
Backend events
| Action Type | Description | Notes |
|---|---|---|
order | Track order | Can also be frontend |
order_cancel | Cancel order | Backend only |
subscribe | Update subscription | Backend for unsubscribe |
Event details
homepage_view
Track homepage visits.
_edrone.action_type = 'homepage_view';
Required fields: action_type
product_view
Track product page views.
_edrone.action_type = 'product_view';
_edrone.product_ids = '12345';
_edrone.product_titles = 'Product Name';
_edrone.product_images = 'https://...';
_edrone.product_urls = 'https://...';
_edrone.product_category_ids = '1~2~3';
_edrone.product_category_names = 'Cat~Sub~Item';
Required fields: action_type, product_ids, product_titles, product_images, product_urls, product_category_ids, product_category_names
category_view
Track category page views.
_edrone.action_type = 'category_view';
_edrone.product_category_ids = '1~2~3';
_edrone.product_category_names = 'Cat~Sub~Item';
Required fields: action_type, product_category_ids, product_category_names
add_to_cart
Track cart additions.
_edrone.action_type = 'add_to_cart';
_edrone.product_ids = '12345';
// ... product fields
_edrone.init(); // Trigger event
Required fields: Same as product_view
order
Track completed orders.
_edrone.action_type = 'order';
_edrone.email = 'customer@example.com';
_edrone.order_id = 'ORD-123';
// ... order and product fields
Required fields: See Required Fields
order_cancel
Cancel a previously tracked order (backend only).
curl -X POST https://api.edrone.me/trace \
-d "app_id=YOUR_APP_ID" \
-d "sender_type=server" \
-d "action_type=order_cancel" \
-d "order_id=ORD-123"
Required fields: action_type, order_id, sender_type
subscribe
Track newsletter subscriptions.
_edrone.action_type = 'subscribe';
_edrone.email = 'subscriber@example.com';
_edrone.subscriber_status = '1';
_edrone.customer_tags = 'Newsletter';
_edrone.init();
Required fields: action_type, email, subscriber_status, customer_tags