Skip to main content

Action Types

All available action_type values and their use cases.

Frontend events

Action TypeDescriptionPage
homepage_viewUser visits homepageHomepage
product_viewUser views a productProduct page
category_viewUser browses categoryCategory page
add_to_cartUser adds to cartProduct/Cart
orderUser completes purchaseThank you page
subscribeUser subscribesNewsletter form

Backend events

Action TypeDescriptionNotes
orderTrack orderCan also be frontend
order_cancelCancel orderBackend only
subscribeUpdate subscriptionBackend 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