Skip to main content

Order

Track completed orders. This is essential for revenue tracking, post-purchase campaigns, and customer segmentation.

When to use

Add this event to your thank you / order confirmation page.

Implementation

<script type="text/javascript">
window._edrone = window._edrone || {};
_edrone.action_type = 'order';

// Customer info
_edrone.email = 'john.doe@example.com';
_edrone.first_name = 'John';
_edrone.last_name = 'Doe';
_edrone.user_id = 'CUST-12345';
_edrone.subscriber_status = '1';

// Order info
_edrone.order_id = 'ORD-98765';
_edrone.country = 'US';
_edrone.city = 'New York';
_edrone.base_currency = 'USD';
_edrone.order_currency = 'USD';
_edrone.base_payment_value = '149.99';
_edrone.order_payment_value = '149.99';

// Products (use | to separate multiple products)
_edrone.product_ids = '12345|67890';
_edrone.product_skus = 'SKU-001|SKU-002';
_edrone.product_titles = encodeURIComponent('Nike Air Max 90|Adidas Ultraboost');
_edrone.product_images = encodeURIComponent('https://store.com/img1.jpg|https://store.com/img2.jpg');
_edrone.product_urls = encodeURIComponent('https://store.com/p/1|https://store.com/p/2');
_edrone.product_counts = '1|2';
_edrone.product_category_ids = '1~2~3|1~2~4';
_edrone.product_category_names = encodeURIComponent('Shoes~Sneakers~Nike|Shoes~Sneakers~Adidas');
</script>

Required fields

Customer info

FieldDescriptionExample
emailCustomer emailjohn@example.com
first_nameCustomer first nameJohn

Order info

FieldDescriptionExample
order_idUnique order IDORD-98765
countryCustomer countryUS
cityCustomer cityNew York
base_currencyYour store's currencyUSD
order_currencyOrder currencyUSD
base_payment_valueOrder value in base currency149.99
order_payment_valueOrder value in order currency149.99

Product info

FieldDescription
product_idsProduct IDs (| separated)
product_titlesProduct names (| separated)
product_imagesImage URLs (| separated)
product_urlsProduct URLs (| separated)
product_countsQuantities (| separated)
product_category_idsCategory IDs (products: |, categories: ~)
product_category_namesCategory names (products: |, categories: ~)

Multiple products separator

Use | (pipe) to separate data for multiple products:

// 2 products: Nike (qty: 1) and Adidas (qty: 2)
_edrone.product_ids = '12345|67890';
_edrone.product_counts = '1|2';
_edrone.product_titles = 'Nike Air Max|Adidas Ultraboost';
Order of values

Keep the same order across all product fields. The first value in each field relates to the first product.