edrone Integration

How it works

Edrone is a system for collecting and analyzing customer behaviour. Collected data and out-of-the-box engagement scenarios allow the system to increase customer retention.

Glossary

Site/Shop/Retailer/Company - e-commerce site that is integrated with edrone SaaS (e.g. online shoes shop).

Integration - process of setting up retailer's site to work with edrone. This includes registering an account, installing module and/or making server side changes on retailer's site, etc.

Custom Integration - integration that does not take advantage of available modules for e-commerce sites. It is typically required when the e-commerce platform does not offer sufficient extensibility mechanism (e.g. rendering custom JS scripts, access to data, etc.) or it is a custom-built store.

Module - package provided by edrone. It allow easy integration between e-commerce platform and edrone system. We provide modules for most of popular e-commerce platforms e.g. Magento, Prestashop, IAI, Shoplo, Shoper, Woocommerce, Shopify, Opencart etc.

Tracker - individual account in the edrone system.

  • Uniquely identified by App Id
  • Managed by Agents
  • It represents a shop in edrone

App Id - unique identifier for a tracker. It is inserted in the retailer's JavaScript tracking code and passed by customer browser (e.g. 53a97649ea0b3).

Onboarding - process of helping newly integrated shop owner to configure his account, design engagements, etc.

Mission Control - (https://control.edrone.me) administration panel for shop owners. It allows to manage Engagements, view reports, etc.

Customer - person who uses retailer services and has email address. Data generated by customers (visits, orders etc.) are collected and analyzed by edrone.

Agent - user that manages edrone Account. More than one agent can be associated with an account (i.e. Tracker).

Engagement - a process of encouraging somebody to return to the retailer site. It is typically a workflow consisting of multiple steps that has trigger conditions associated with them, e.g. RESTORE CUSTOMERS, RECOVER ABANDONED CARTS, etc.

Coupon - a code that allows user to obtain a discount. It is generated by retailer and uploaded to edrone. Coupons are included in the message and redeemed at retailer's site.

  • Static coupons - identical code is sent to all customers. The code is set in Mission Control.
  • Dynamic coupons - each customer receives unique code. Codes are generated by e-commerce platform and uploaded to edrone via Mission Control.

Drag&Drop editor - visual editor for creating HTML email templates based on dragging and dropping components (e.g. text blocks, placeholders, image elements)

HTML editor - visual editor for creating HTML code directly. Every email created in Drag’n’Drop editor can be edited in HTML editor. However, you cannot return to editing it in Drag’n’Drop editor after direct HTML modification.

Dynamic Placeholder - an element that can be added to email design. When email is sent to a specific Customer the placeholder is replaced with personalized image, text etc.

Spender - customer (identified) who made at least one order.

One-Time Spender - spender who made exactly one order.

Repeat Spender - spender who made more than one order.

Inactive Customer - customer who has not visited the site for a specified period of time.

No Risk Inactive Customer - customer who has not visited the site [0, 7) days.

Low Risk Inactive Customer - customer who has not visited the site [7,30) days.

High Risk Inactive Customer - customer who has not visited the site for [30,∞) days

Spender Value - total value of orders made by a spender. Example: customer who made two orders 24$ and 36$ has a spender value of 60$

Low Spender Threshold - it is calculated so that the Low Spenders segment holds 80% of customers with the lowest total purchase value. Mathematically, it is the 80th percentile of spenders value. Separates Low Spenders from Medium Spenders.

Big Spender Threshold - it is calculated so that the Big Spenders segment holds 1% of customers with the highest total purchase value. Mathematically, it is the 99th percentile of spenders value. Separates Medium Spenders from Big Spenders.

Low Spender - spender whose value obtained by edrone algorithm is equal to or less than value of Low Spender Threshold. Typically Low Spenders group has many members.

Big Spender - spender whose value obtained by edrone algorithm is greater than Big Spender Threshold. Typically Big Spenders group has few members.

Medium Spender - spender whose value is between Low Spender and Medium Spender.

Frequent Spender - spender who is in top 25% who made the highest number of orders (order value is not considered here).

Trend Setter - customer who is active on Social Media.

Prospect - customer (identified) who has not made any order yet - he or she is not a Spender

Subscription Status - whether or not recipient wants to receive email

  • SUBSCRIBED
  • UNKNOWN - no information is available (e.g. it is not provided by e-commerce platform)
  • UNSUBSCRIBED

Double Opt-In - process of obtaining e-mail subscription consent. Upon entering email address recipient is sent an email containing unique subscription confirmation link. When the link is clicked the email address is marked as subscribed. This process can be implemented by the shop itself or by edrone using NEWSLETTER SUBSCRIPTION Engagement.

* Historical integrations may use OTHER for this interaction

Identifying Visitors

We use three methods of identifying visitors.

Field: "email" - if email field is passed in the event we use it as unique identifier of the customer. It applies to events originating from browser as well as server-side.

Field: "c_id" - this is a unique identifier generated by edrone JS script. It is stored in the browser local storage and passed in the event. If available we store mapping "c_id"-"email" so that we can uniquely identify customer based on "c_id" only in future events. It applies to events originating from browser only.

Cookie: "ccid" - this is a Third Party Cookie (Domain: "edrone.me") set by our system. It is automatically generated in response to the event set. If available we store mapping "ccid"-"email" so that we can uniquely identify customer based on "ccid" only in future events. It applies to events originating from browser only.

When system receives an event it evaluates what identifying information has been provided, existing mappings stored and makes an identity decision.

Event types

Trace - data describing customer interaction on the e-commerce site. We trace the following types of interactions:

  • PRODUCT_VIEW - customer viewed a product
  • ADD_TO_CART - customer added a product to the cart
  • ORDER - customer made an order
  • OTHER - other interaction (Automatically initialized when edrone_2_0.js is inserted in the <head> part of page.)
  • SUBSCRIBE - customer subscribe to newsletter form
  • ORDER_CANCEL - for instance, order was unpaid

Sending data to Edrone(browser - default)

E-commerce server generates JavaScript code which is returned to the end customer browser. In effect the end customer browser sends the data to Edrone servers.


Initial code that should be included in head section. edrone_2_0.js - External JavaScript library provided by edrone.
Url: https://d3bo67muzbfgtl.cloudfront.net/edrone_2_0.js It should be initialized once using the following script
_edrone.init() - Function that is used to send data to edrone. It is automatically initialized after event "window.onload".
<script type="text/javascript">
   (function (srcjs) {
       window._edrone = window._edrone || {};
       _edrone.app_id = 'YOUR APP_ID';
       _edrone.version = '1.0.0';
       _edrone.platform_version = '1.0.0';
       _edrone.platform = 'custom';
       _edrone.email = "example@edrone.me" // if user is logged_in
       _edrone.first_name = "John" // if user is logged_in
       _edrone.last_name = "Doe" // if user is logged_in
       _edrone.subscriber_status = "1/0"  // if user is logged_in
       _edrone.country = 'UK'; // if user is logged_in
       _edrone.city = 'London'; // if user is logged_in
       var doc = document.createElement('script');
       doc.type = 'text/javascript';
       doc.async = true;
       doc.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + srcjs;
       var s = document.getElementsByTagName('script')[0];
       s.parentNode.insertBefore(doc, s);
   })("//d3bo67muzbfgtl.cloudfront.net/edrone_2_0.js?app_id=YOUR_APP_ID");
</script>

Expected result for "other" action for logged in user

other_with_logged_user


Expected result for "other" action for not logged in user

other_without_logged_user

If you already got initial script include in your head section, next step is to implement product_view action. That should be implemented in the end of body section:

<script type="text/javascript">
       window._edrone = window._edrone || {};
       _edrone.product_skus = 'MAK03035';
       _edrone.product_ids = '3434';
       _edrone.product_titles = 'SANTI-DONNA'; // use url_encode
       _edrone.product_images = 'https://x.z..com/media/s/x/cache/3/image/df/3/u/3u1a6597--1200q100.jpg'; // use url_encode 
       _edrone.product_urls = 'https://x.z..com/3u1a6597--1200q100'; // use url_encode 
       _edrone.product_availability = 1;
       _edrone.product_category_ids = "12~24~36" // use "~" sign to separate values from each other 
       _edrone.product_category_names = "Buty~Buty damskie~Szpilki" // use "~" sign to separate values from each other and url_encode on single value
       _edrone.action_type = 'product_view';
</script>

Expected result for "product_view" action for logged in user

product_view

Next step is to implement add_to_cart action. Thats also should be implemented in the end of body section, but if add_to_cart button is on the same page as product you only have to change action_type to add_to_cart:

<script type="text/javascript">
       window._edrone = window._edrone || {};
       let addToCartButton = document.querySelector("#addToCartButton")
       if (addToCartButton) {
         addToCartButton.addEventListener('click', () => {
           _edrone.action_type = "add_to_cart"
           _edrone.init()
         })
       }
</script>

Expected result for "add_to_cart" action for logged in user

product_view

What if your add to cart button is included in some product list(home page, category page)?

<script type="text/javascript">
       window._edrone = window._edrone || {};
       let addToCartButtonList = document.querySelectorAll(".addToCartButton")
       addToCartButtonList.forEach((button) => {
         if (button) {
           button.addEventListener('click', () => {
           _edrone.product_ids = button.getAttribute('product_ids')
           _edrone.product_skus = button.getAttribute('product_skus')
           _edrone.product_titles = button.getAttribute('product_titles')
           _edrone.product_images = button.getAttribute('product_images')
           _edrone.product_urls = button.getAttribute('product_urls')
           _edrone.product_category_ids = button.getAttribute('product_category_ids')
           _edrone.product_category_names = button.getAttribute('product_category_names')
           _edrone.action_type = "add_to_cart"
           _edrone.init()
         })
         }
       })
</script>

Next step is to implement order action. Thats also should be implemented on "success page" in the end of body section.
<script type="text/javascript">
       window._edrone = window._edrone || {};
       _edrone.action_type = 'order';
       _edrone.email = 'john.doe@edrone.me';
       _edrone.first_name = 'John';
       _edrone.last_name = 'Doe';
       _edrone.subscriber_status = '1';
       _edrone.product_skus = 'NL1975286|NL2075286'; // use "|" sign to separate products from each other
       _edrone.product_ids = '12|13'; // use "|" sign to separate products from each other
       _edrone.product_titles = 'Sorel Women shoes Glacy|Sorel Women shoes Glacy Explorer Shortie'; // use "|" sign to separate products from each other and use url_encode
       _edrone.product_images = 'https://demo-store.edrone.me/img/p/4/5/45-large_default.jpg|https://demo-store.edrone.me/img/p/4/7/47.jpg'; // use "|" sign to separate products from each other and use url_encode
       _edrone.product_urls = 'https://demo-store.edrone.me/index.php?id_product=12&controller=product|https://demo-store.edrone.me/index.php?id_product=13&controller=product'; // use "|" sign to separate products from each other and use url_encode
       _edrone.product_category_ids = '2~3~4|2~3~4'; // use "|" sign to separate products from each other and "~" to separate values connected to product from each other and use url_encode
       _edrone.product_category_names = 'Main~Shoes~Women shoes|Main~Shoes~Women shoes'; // use "|" sign to separate products from each other and "~" to separate values connected to product from each other and use url_encode
       _edrone.product_counts = '1|3'; // use "|" sign to separate products from each other
       _edrone.order_id = '4321';
       _edrone.country = 'UK';
       _edrone.city = 'London';
       _edrone.base_currency = 'GBP';
       _edrone.order_currency = 'GBP';
       _edrone.base_payment_value = '671.50';
       _edrone.order_payment_value = '671.50';
</script>

How to integrate your newsletter form with edrone:
<script>
  window._edrone = window._edrone || {};
  let newsletterForm = document.querySelector('#newsletterForm')
  if (newsletterForm) {
    newsletterForm.addEventListener('submit', () => {
      _edrone.customer_tags = 'Footer'; // You can use different tags for different forms.
      _edrone.email = newsletter.querySelector('input[type="email"]').value;
      _edrone.first_name = newsletter.querySelector('input[type="name"]').value;
      _edrone.action_type = 'subscribe';
      _edrone.init();
    })
  }
</script>

Fields with multiple values Certain event types may require multiple values in the trace field. For example when an order event occurs the customer might have purchased multiple items.

In order to specify multiple values in a field separate them by pipe character (|)

Example

_edrone.product_skus = 'MAK03035|FE01041';

The following fields allow multiple values:
  • product_ids
  • product_titles
  • product_images
  • product_skus
  • product_urls
  • product_category_ids
  • product_category_names
  • customer_tags
  • product_counts
  • product_brand_ids
  • product_brand_names

A single product may belong to multiple categories (product_category_ids I product_category_names). In such case each category should be separated by ~ character.

Example

 _edrone.product_category_ids = '12~24~36';
 _edrone.product_category_names = 'Buty~Buty damskie~Szpilki';

Character encoding Any special characters (e.g. ",',<,>,&) should be encoded using url_encode function

Sending data to Edrone(server)

Each request(trace) can be sent either through browser or server side. In order to re-identify customers after they leave their e-mail address on store e.g(login, register, sign up for newsletter etc). edrone adds unique identifiers stored inside cookies(first-party&third-party) or localStorage to each request. Even after customers are logged out from the store, edrone is able to re-identifiy them. This is the main reason why the browser is a default option.

In case where store has access to customer email, those additional identifieres are not needed anymore.

You will find cases(based on action_type) where store can send request via server below:

Subscription Change
The "subscribe" event allows to change customer subscription status. It's important to change field "sender_type" to server. Subscription change won't work without that.


<?php
  function subscriptionChange(){
    $edroneData = 'version=' . '1.0.0' .
       '&app_id=' . 'YOUR APP ID' .
       '&email=' . 'email@example.pl' .
       'subscriber_status=' . '0/1' .
       '&action_type=' . 'subscribe' .
       '&sender_type=' . 'server';
       return $edroneData;
    }

  function httpPost($url, $params) {
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($ch, CURLOPT_HEADER, false);
     curl_setopt($ch, CURLOPT_POST, count($params));
     curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
     $output = curl_exec($ch);
     curl_close($ch);
     return $output;
  }
  httpPost('https://api.edrone.me/trace', subscriptionChange());


Order cancel
The "order_cancel" event allows marking orders in edrone CRM system as deleted.


<?php
  function orderCancel(){
    $edroneData = 'version=' . '1.0.0' .
       '&app_id=' . 'YOUR APP ID' .
       '&email=' . 'email@example.pl' .
       '&order_id=' . '00001' .
       '&action_type=' . 'order_cancel' .
       '&sender_type=' . 'server';
       return $edroneData;
    }

  function httpPost($url, $params) {
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($ch, CURLOPT_HEADER, false);
     curl_setopt($ch, CURLOPT_POST, count($params));
     curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
     $output = curl_exec($ch);
     curl_close($ch);
     return $output;
  }
  httpPost('https://api.edrone.me/trace', orderCancel());


Order


<?php
  function order(){
    $edroneData = 'version=' . '1.0.0' .
        '&app_id=' . 'YOUR_APP_ID' .
        '&email=' . $order->email .
        '&first_name=' . $order->first_name .
        '&last_name=' . $order->last_name .
        '&product_ids=' . join('|', $product_ids) .
        '&product_titles=' . join('|', $product_titles) .
        '&product_images=' . join('|', $product_images) .
        '&product_urls=' . join('|', $product_urls) .
        '&product_counts=' . join('|', $product_counts) .
        '&product_category_ids=' . join('|', $product_category_ids) .
        '&product_category_names=' . join('|', $product_category_names) .
        '&order_id=' . $order->order_id .
        '&order_payment_value=' . $order->order_payment_value .
        '&base_payment_value=' . $order->order_payment_value .
        '&sender_type=' . 'server' .
        '&base_currency=' . $order->order_currency .
        '&order_currency=' . $order->order_currency .
        '&action_type=' . 'order' .
        '&country=' . $order->country .
        '&city=' . $order->city .
        '&phone=' . $order->phone .
        '&customer_tags=' . join('|', $order->customer_tags) .
        '&subscriber_status=' . '' .
        '&event_utc_date=' . $order->event_date .
        '&utc_time=' . utcNow();
    return $edroneData;
    }

  function httpPost($url, $params) {
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($ch, CURLOPT_HEADER, false);
     curl_setopt($ch, CURLOPT_POST, count($params));
     curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
     $output = curl_exec($ch);
     curl_close($ch);
     return $output;
  }
  httpPost('https://api.edrone.me/trace', order());


Marketing Machine

To make the Marketing Machine fully functional: add script to your category page which is presented below. Example:

<script type="text/javascript">
  window._edrone = window._edrone || {};
  _edrone.product_category_ids = '${category_id}' // use "~" sign to separate values from each other if you want to send more then one category id
  _edrone.product_category_names = "${category_name}" // use "~" sign to separate values from each other if you want to send more then one category name
</script>

Types of recommendations

Go to Mission Control -> Marketing Machine -> Life settings to select type and priority of your onsite frame recommendations:

  • collaborative filtering: analyze the customer's behaviour and recommend products that are liked by other customers with similar preferences;
  • basket analysis: when client is on product page, recommend products co-purchased with the product;
  • complementary products: configure product sets matched to the product and display them when client is on the product page. The matched product could be set via product feed. See the relevant section in the documentation;
  • bestseller: show products most often purchased in your store;
  • newest products: show products that have recently appeared in the store. We recommend using product feed to have an up-to-date product catalog for your store.
  • recently viewed: show products that the customer recently viewed. Use the TTL for product view to control how old product views take into account;
  • recently added to cart but not ordered: show products that the customer recently added to cart, but not ordered. Use the TTL for add to cart and TTL for order to take into account only specifc date range;

To have basket analysis and complementary products working, add this script on pages where you want to use it. Notice that "product_ids" field is automatically filed on every product page.

<script type="text/javascript">
  window._edrone = window._edrone || {};
  _edrone.current_product_id = '${product_ids}' // use "~" or "|" sign to separate values from each other if you want to send more then one product id
</script>

Page Caching

Edrone JS code sends personal data (email, first name, last name, phone, city, country, etc.) to edrone servers. In order for the script to have access to personal data it is typically rendered in the page code, example:

window._edrone = window._edrone || {};
_edrone.app_id = '789d7d6ddfdf';
_edrone.version = '1.1.20';
_edrone.platform = 'Magento';
_edrone.platform_version = '1.8.0.2';
_edrone.email = 'john@smith.org';
_edrone.phone = '0123456789';
_edrone.first_name = 'John';
_edrone.last_name = 'Smith';

It is critical that e-commerce platform DOES NOT cache pages containing this data as it may inadvertently publicly show personal data belonging to other user.

Please make sure configuration of your caching mechanisms (full page caching, Varnish, etc.) takes into account the above.

Tags

Tags are used to associate additional information about a customer. This information may be later used in engagements.

Example

_edrone.customer_tags = 'gamer|Grand Theft Auto';

Before sending tags you must define them in edrone panel

Note: you can define maximum 64 Tags

Subscription

Choose from 4 different opt-in types in edrone panel.

Type Description
edrone double opt-in Double Opt-In provided by edrone.
non edrone double opt-in Double Opt-In provided by some other system or store.
single opt-in with message Single Opt-In with welcome message.
single opt-in Single Opt-In without welcome message.

Subscription - Use the subscribe action to send the information about customer subscription.

Example

<script>
$('#submit-button').on('click', function(){
    _edrone.customer_tags = 'From PopUp';
    _edrone.email = $('#input-email').val();
    _edrone.first_name = $('#input-name').val();
    _edrone.action_type = 'subscribe';
    _edrone.init();
});
</script>

  • $('#submit-button') - identifier of the subscription form button
  • $('#input-email').val(); - value of the email field
  • $('#input-name').val(); - value of the first name field

Subscription Status Reason

You can find customer subscription status reason in edrone panel on customer page.

ID Type Description
1 CUSTOMER_UNSUBSCRIBED Customer requested to be UNSUBSCRIBED by clicking on the "unsubscribe" link.
2 HARD_BOUNCED_UNSUBSCRIBED Recipient server returned SMTP code that was classified as HARD_BOUNCE, i.e. delivery to the target mailbox is permanently not possible. Typically happens when email address no longer exists or some other uncrecoverable error occurs. As a result customer is UNSUBSCRIBED.
3 CUSTOMER_SPAM_COMPLAINT_UNSUBSCRIBED Customer issued a spam complaint for the message.
4 AGENT_UNSUBSCRIBED Agent manually set the status (using Mission Control) to UNSUBSCRIBED.
5 EMAIL_INCORRECT_UNSUBSCRIBED Email address is incorrectly formatted and was UNSUBSCRIBED.
6 TRACE_UNSUBSCRIBED Trace which we received for the customer indicates the customer UNSUBSCRIBED.
7 DATA_IMPORT_UNSUBSCRIBED Customer was imported via CSV import and the value is UNSUBSCRIBED.
8 EXTERNAL_API_UNSUBSCRIBED Customer data received from External API (e.g. IAI API) indicates customer is UNSUBSCRIBED.
9 SPAM_BOUNCED_UNSUBSCRIBED Message for customer got rejected by the ESP with indication that it is spam. Customer was subsequently UNSUBSCRIBED.
10 TRACE_SUBSCRIBED Trace we received for the customer indicates the customer is SUBSCRIBED.
11 AGENT_SUBSCRIBED Agent manually set the status (using Mission Control) to SUBSCRIBED.
12 DATA_IMPORT_SUBSCRIBED Customer was imported via CSV import and the value is SUBSCRIBED.
13 TRACE_UNKNOWN Trace we received for the customer indicates the customer subscription status is UNKNOWN.
14 ENGAGEMENT_TEST_MESSAGE_UNKNOWN Engagement Test Message was sent to non-existing entity. In that case we create customer and set his status to UNKNOWN
15 SUBSCRIPTION_CHANGED_EVENT_SUBSCRIBED Customer set subscription by clicking "subscribe" link in the email.
16 EXTERNAL_API_SUBSCRIBED Customer data received from External API indicates customer is subscribed
17 EXTERNAL_API_UNKNOWN Customer data received from External API indicates customer is unknown
18 LEGACY_UNSUBSCRIBED Historical value not supported anymore.
19 CUSTOMER_DELETED_UNSUBSCRIBED Customer has been deleted
20 TOPIC_OBSERVE_UNKNOWN Email received from topic_observer where we don't have information about subscription status
21 DATA_IMPORT_UNKNOWN Customer was imported via CSV import and marked as unknown
22 SUPPORT_UNKNOWN Susbcription status was changed by internal support team.
23 SUPPORT_SUBSCRIBED Susbcription status was changed by internal support team.
24 SUPPORT_UNSUBSCRIBED Susbcription status was changed by internal support team.
25 CUSTOMER_RESUBSCRIBE Customer re-subscribed on the "Unsubscribe view"
26 LEGACY_SUBSCRIBED Historical value not supported anymore.
27 LEGACY_UNKNOWN Historical value not supported anymore.
28 SUBSCRIPTION_CHANGED_EVENT_UNSUBSCRIBED Customer unsubscribe by clicking "unsubscribe" link in the email.
29 DOUBLE_OPT_IN_NON_EDRONE_UNKNOWN Customer UNKNOWN by opt-in type.
30 DOUBLE_OPT_IN_EDRONE_UNKNOWN Customer UNKNOWN by opt-in type.
31 SINGLE_OPT_IN_SUBSCRIBED Customer SUBSCRIBED by opt-in type.
32 SINGLE_OPT_IN_WITH_MESSAGE_SUBSCRIBED Customer SUBSCRIBED by opt-in type.

SMS subscription Status Reason

You can find customer sms subscription status reason in edrone panel on customer page.

ID Type Description
1 DATA_IMPORT_SUBSCRIBED Customer was imported via CSV import and the value is SUBSCRIBED.
2 DATA_IMPORT_UNSUBSCRIBED Customer was imported via CSV import and the value is UNSUBSCRIBED.
3 DATA_IMPORT_UNKNOWN Customer was imported via CSV import and marked as UNKNOWN.
4 AGENT_UNSUBSCRIBED Agent manually set the status (using Mission Control) to UNSUBSCRIBED.
5 AGENT_SUBSCRIBED Agent manually set the status (using Mission Control) to SUBSCRIBED.
6 CUSTOMER_UNSUBSCRIBED Customer requested to be UNSUBSCRIBED by clicking on the "unsubscribe" link.
7 LEGACY_SUBSCRIBED Historical value not supported anymore.
8 CUSTOMER_DELETED_UNSUBSCRIBED Customer has been deleted
9 CUSTOMER_SELF_RESURRECT
10 TRACE_UPDATE Source of subscription change was trace
11 CHAT_UNKNOWN Chat message was sent to non-existing entity. In that case we create customer and set his status to UNKNOWN.
12 INBOX_UNKNOWN Inbox email message was sent to non-existing entity. In that case we create customer and set his status to UNKNOWN.

Syncing subscription status webhook

edrone offers a mechanism to notify the e-commerce platform that customer subscription status has been changed. E-commerce platform needs to provide a HTTPS endpoint that will be automatically called upon subscription status change.

Example https://www.a_shop.com/update_subscriber_status

The following fields are sent (POST) to e-commerce platform.

NATIVE_5 (introduces SMS subscription status synchronization)

Parameter name Description
subscription_status_type_id Indicates which subscription status type has been changed
  • 1 - EMAIL
  • 2 - SMS
email Customer email address
phone Customer phone
subscriber_status Email/phone subscription status:
  • 0 - unsubscribed
  • 1 - subscribed
  • empty - information not available
subscription_status_reason Subscription status reason for:
event_date UTC date when the customer subscription status was changed.
event_id Unique event identifier
app_id Unique shop identifier - available in Mission Control (Settings > Integration)
signature HMAC that can be used by ecommerce platform to verify that the request is authentic. It uses a secret (app_secret) that is available in Mission Control (Settings > Integration)

Example (PHP)
$hash=hash("sha256",($subscription_status_type_id == 1? $email : $phone).$subscribeStatus.$subscriptionStatusReason.$eventDate.$eventId.$secret.$appId, false);
$signature = base64_encode($hash);

NATIVE_4 (current)

Parameter name Description
email Customer email address
subscriber_status Email subscription status:
  • 0 - unsubscribed
  • 1 - subscribed
  • empty - information not available
subscription_status_reason Subscription status reason: https://edrone.me/pl/docs/#subscription-status-reason
event_date UTC date when the customer subscription status was changed.
event_id Unique event identifier
app_id Unique shop identifier - available in Mission Control (Settings > Integration)
signature HMAC that can be used by ecommerce platform to verify that the request is authentic. It uses a secret (app_secret) that is available in Mission Control (Settings > Integration)

Example (PHP)
$hash=hash("sha256",$email.$subscribeStatus.$subscriptionStatusReason.$eventDate.$eventId.$secret.$appId, false);
$signature = base64_encode($hash);

NATIVE_3 (deprecated)

Parameter name Description
email Customer email address
subscriber_status Email subscription status:
  • 0 - unsubscribed
  • 1 - subscribed
  • empty - information not available
event_date UTC date when the customer subscription status was changed.
event_id Unique event identifier
app_id Unique shop identifier - available in Mission Control (Settings > Integration)
signature HMAC that can be used by ecommerce platform to verify that the request is authentic. It uses a secret (app_secret) that is available in Mission Control (Settings > Integration)

Example (PHP)
$hash=hash("sha256",$email.$subscribeStatus.$eventDate.$eventId.$secret.$appId, false);
$signature = base64_encode($hash);

NATIVE_2 (deprecated)

Parameter name Description
email Customer email address
subscriber_status Email subscription status:
  • 0 - unsubscribed
  • 1 - subscribed
  • empty - information not available
event_date UTC date when the customer subscription status was changed.
event_id Unique event identifier
signature HMAC that can be used by ecommerce platform to verify that the request is authentic. It uses a secret (app_secret) that is available in Mission Control (Settings > Integration)

Example (PHP)
$hash=hash("sha256",$email.$subscribeStatus.$eventDate.$eventId.$secret, false);
$signature = base64_encode($hash);

NATIVE_1 (deprecated)

Parameter name Description
email Customer email address
signature HMAC that can be used by ecommerce platform to verify that the request is authentic. It uses a secret (app_secret) that is available in Mission Control (Settings > Integration)

Example (PHP)
$hash=hash("sha256",$email.$secret, false);
$signature = base64_encode($hash);

When is webhook invoked?

  • We can send notification on every subscription status change. This can be configured in Mission Control.
  • Currently we do not invoke the webhook when customers are manually imported via CSV file

To add subscription status endpoint, login to your Mission Control Panel then go to Settings and Platforms.

Wishlist

The WISHLIST engagement allows to send e-mail to all customers awaiting certain event (e.g. customer receives notification that shoe size he is waiting for is now available). In order to use it the e-commerce platform needs to send two additional events.

topic_observe

Url: https://api.edrone.me/topic_observe

Sent when customer observes an event (e.g. shoe size availability)

Field Description
app_id See Trace API below
email See Trace API below
topic_id Topic identifier is used to match topic_observe event with topic_publish event.
topic_campaign_id Campaign identifier of the observed topic. Its mapped to email design. The default setup is the same design for all wishlist topics. If you would like to create more designs please contact our support.
<script>
    $('#__subscribe-button').on('click', function() {
       
        var email = $('#email').val(); // get this value from email input
        var productId = $('#product-box').data('product-id'); // example - productId can be provided in some other way 
        $.post('https://api.edrone.me/topic_observe', {
            app_id: '[YOUR_APP_ID]',
            email: email,
            topic_id: productId, //unique per topic
            topic_campaign_id: 0 // 0 - default email design
        }).done(function(data) {
           // handle this part based on your needs 
        });
    });
</script>

Example https://api.edrone.me/topic_observe?app_id=bdag3h3563u&email=przykladowyemail@gmail.com&topic_id=dg623be63bbs&topic_campaign_id=0&action_type=topic_observe

topic_publish

Trigger notification for all the customers observing the topic. Url: https://api.edrone.me/topic_publish

Value Description
app_id See Trace API below
topic_id Topic identifier is used to match topic_observe event with topic_publish event.
product_ids See Trace API below
product_urls CSee Trace API below
product_skus See Trace API below
product_titles See Trace API below
product_images See Trace API below
product_category_ids See Trace API below
product_category_names See Trace API below
product_brand_ids See Trace API below
product_brand_names See Trace API below
<script>
    $('#notify-availability').on('click', function() {

        var productId = $('#product-id-input').val(); // example - productId can be provided in some other way
        $.post('https://api.edrone.me/topic_publish', {
            app_id: '[YOUR_APP_ID]',
            topic_id: productId,
            product_ids: 'example value',
            product_urls: 'example value',
            product_skus: 'example value',
            product_titles: 'example value',
            product_images: 'example value',
            product_category_ids: 'example value',
            product_category_names: 'example value',
            product_brand_ids: 'example value',
            product_brand_names: 'example value'
        }).done(function(data) {
            // handle this part based on your needs
            alert('Customers will be notified')
        });
    });
</script>

get_subscribers_count

Returns the number of currently subscribed customers for a specific productId.
Url https://api.edrone.me/wishlist_get_subscribers_count?app_id=XX&product_id=XX

Field Description
app_id See Trace API below
product_id Id of product we ask for

Refer-a-friend - custom landing page to collect references

An optional method of acquiring users is to create a landing page with a sign-up form. The form should be sent as JSON using the POST method.

affiliation
Url: https://api.edrone.me/affiliation

Field Description
app_id Required; See Trace API below
email Required; Customer email address.
e_ref Required; A unique referral code for the referring user. It can be send from any other engagement.
first_name Optional; Customer first name.
last_name Optional; Customer last name.

<div id="refer-a-friend-form">
  <input type="hidden" id="app_id" name="app_id" value="example_app_id">
  <label for="e_ref">Refferal code</label><br>
  <input type="text" id="e_ref" name="e_ref"><br>
  <label for="email">Email</label><br>
  <input type="text" id="email" name="email"><br>
  <label for="first_name">First name</label><br>
  <input type="text" id="first_name" name="first_name"><br>
  <label for="last_name">Last name</label><br>
  <input type="text" id="last_name" name="last_name"><br>
  <button>Confirm</button>
</div>
<script>
  $('#refer-a-friend-form button').on('click', function (event) {
    var data = {}
    $('#refer-a-friend-form input').each(function() {
      data[$(this).attr('name')] = $(this).val()
    })
    $.post("https://api-local.edrone.me/affiliation",  JSON.stringify(data));
  })

  $( document ).ready(function() {
    var urlParams = new URLSearchParams(window.location.search);
    $('input#e_ref').val(urlParams.get('e_ref'))
  });
</script>

example form code

Trace API

Parameter name Api Version Description
app_id 20150609 Application identifier. Uniquely identifies an e-commerce site. It is assigned by Edrone when new account is created. It must be set on the e-commerce site - typically by configuration screen.
c_id 20150609 Unique customer tracking identifier. Stored by customer browser. This field is automatically generated by edrone_2_0.js script.
version 20150609 Version of the module installed on the e-commerce site.
email 20150609 Customer email address
first_name 20150609 Customer first name
last_name 20150609 Customer last name
product_ids 20150609 Product identifiers for products that were viewed, added to cart or ordered. In case of Magento and Prestashop these are internal database product ids.
product_titles 20150609 Name of the product: viewed, added to cart or ordered by the customer.
product_images 20150609 Absolute urls to the images of the products viewed, added to cart or ordered by the customer.
order_id 20150609 Unique e-commerce site identifier of the order made by the customer.
action_type 20150609
    Type of action performed by customer:
  • product_view - individual product page
  • add_to_cart - added an item to the cart
  • order - customer has successfully completed and order
  • subscribe - subscription (typically pop-up)
  • order_cancel - customer order has been cancelled
  • other - none of the above
country 20150609 Customer country
city 20150609 Customer city
gender 20201210
  • m - male
  • f - female
  • other - other
  • empty value - information not available
  • birth_date 20201217 yyyy-MM-dd
    base_currency 20150619 Currency in which an e-commerce site operates. In case of e-commerce sites with multiple currencies this represents the main (global) currency.
    order_currency 20150619 Currency in which the customer order has been made. It may be different from e-commerce site base currency.
    base_payment_value 20150619 Total payment value of the order completed by the customer expressed in base_currency.
    Mandatory field for Order events. Used a basis for all revenue calculations
    order_payment_value 20150619 Total payment value of the order completed by the customer expressed in the order_currency. Used when e-commerce site allows purchasing products in various currencies.
    phone 20150724 Customer phone number
    coupon 20150724 Coupon used during order
    platform_version 20150812 Version of the e-commerce platform (e.g. 1.9.2.1 for Magento)
    product_skus 20150819 Product SKUs (stock keeping unit) for products that were viewed, added to cart or ordered.
    platform 20151026 Name of the e-commerce platform (custom, magento, etc.)
    subscriber_status 20151113
    (20160531)
      Email subscription status:
    • 0 - unsubscribed
    • 1 - subscribed
    • empty - information not available
    utc_time 20151113 UTC server time when snippet was generated.
    product_urls 20160104 Absolute urls of the products,
    product_category_ids 20160307 Category identifiers for each product in the trace. Many categories per product are allowed. Multiple entries are separated by "~" for one product then pipe character | to seperate with another product.
    product_category_names 20160307 Category names for each product in the trace. Many categories per product are allowed. Multiple entries are separated by "~" for one product then pipe character | to seperate with another product.
    product_brand_ids 20171010 Brand identifiers for each product in the trace. Only one brand per product is allowed. Multiple entries are separated by pipe character |
    product_brand_names 20171010 Brand names for each product in the trace. Only one category per product is allowed. Multiple entries are separated by pipe character |
    customer_tags 20160406 Tags to be associated with the customer. Multiple entries as separated by pipe character |
    product_counts 20160831 Count of product. Multiple entries as separated by pipe character |
    sender_type 20161201
      Indicates who is sending a trace
    • browser (default if absent)
    • server
    shop_lang 20170127 Shop language version
    shop_id 20170127 Identifier of the shop (used by Magento)
    website_id 20170127 Shop website identifier (used by Magento)
    product_availability 20180104
      Product availability status:
    • 1 - available
    • 0 - found but unavailable
    • -1 - not found
    sms_subscriber_status 20180306
      SMS subscription status:
    • 0 - unsubscribed
    • 1 - subscribed
    • empty - information not available
    event_utc_date 20180315 UTC server time when event has taken.
    order_origin 20190304
      Indicates order origin
    • shop (default if absent)
    • allegro

    Trace API - Mandatory fields for all action types

    Other Product View Add To Cart Order Subscribe OrderCancel
    app_id M M M M M M
    version M M M M M M
    action_type M M M M M M
    platform_version M M M M M M
    platform M M M M M M
    sender_type M M M M M M

    Trace API - Mandatory fields for specific action types

    Other Product View Add To Cart Order Subscribe OrderCancel
    email A A A M M M
    first_name A A A M A
    last_name A A A A A
    product_ids M M M
    product_titles M M M
    product_images M M M
    order_id M M
    country A A A M A
    city A A A M A
    base_currency M
    order_currency M
    base_payment_value M
    order_payment_value M
    phone A A A A A
    coupon A
    product_skus M* M* M*
    subscriber_status
    sms_subscriber_status
    product_urls M M M
    product_category_ids M M M
    product_category_names M M M
    product_brand_ids A A A
    product_brand_names A A A
    customer_tags A A A A A
    utc_time A A A A A
    product_counts A M
    shop_lang A A A A A A
    shop_id A A A A A A
    website_id A A A A A A
    product_availability A A
    event_utc_date

    * - if there are no product_ids

    M - mandatory field

    A - optional field

    JavaScript examples(browser)

    Other

    
    <script type="text/javascript">
           _edrone.app_id = '51a97611a3430';
           _edrone.version = '1.0.0';
           _edrone.action_type = 'other';
           _edrone.platform_version = '3.1.26';
           _edrone.platform = 'custom';
    </script>
    
    

    Product view

    
    <script type="text/javascript">
           _edrone.app_id = '51a97611a3430';
           _edrone.version = '1.0.0';
           _edrone.action_type = 'product_view';
           _edrone.platform_version = '3.1.26';
           _edrone.platform = 'custom';
           _edrone.product_skus = 'NL1975286';
           _edrone.product_ids = '12';
           _edrone.product_titles = 'Sorel Women\'s shoes Glacy';
           _edrone.product_images = 'https://demo-store.edrone.me/img/p/4/5/45-large_default.jpg';
           _edrone.product_urls = 'https://demo-store.edrone.me/index.php?id_product=12&controller=product';
           _edrone.product_category_ids = '2~3~4';
           _edrone.product_category_names = 'Main~Shoes~Women\'s shoes';
           _edrone.product_availability = '1';
    </script>
    
    
    

    Add to cart

    
    <script type="text/javascript">
           _edrone.app_id = '51a97611a3430';
           _edrone.version = '1.0.0';
           _edrone.action_type = 'add_to_cart';
           _edrone.platform_version = '3.1.26';
           _edrone.platform = 'custom';
           _edrone.product_skus = 'NL1975286';
           _edrone.product_ids = '12';
           _edrone.product_titles = 'Sorel Women shoes Glacy';
           _edrone.product_images = 'https://demo-store.edrone.me/img/p/4/5/45-large_default.jpg';
           _edrone.product_urls = 'https://demo-store.edrone.me/index.php?id_product=12&controller=product';
           _edrone.product_category_ids = '2~3~4';
           _edrone.product_category_names = 'Main~Shoes~Women shoes';
    </script>
    

    Order

    
    <script type="text/javascript">
           _edrone.app_id = '51a97611a3430';
           _edrone.version = '1.0.0';
           _edrone.action_type = 'order';
           _edrone.platform_version = '3.1.26';
           _edrone.platform = 'custom';
           _edrone.email = 'john.doe@edrone.me';
           _edrone.first_name = 'John';
           _edrone.last_name = 'Doe';
           _edrone.gender = 'M';
           _edrone.birth_date = '1995-02-28';
           _edrone.subscriber_status = '1';
           _edrone.product_skus = 'NL1975286|NL2075286';
           _edrone.product_ids = '12|13';
           _edrone.product_titles = 'Sorel Women shoes Glacy|Sorel Women shoes Glacy Explorer Shortie';
           _edrone.product_images = 'https://demo-store.edrone.me/img/p/4/5/45-large_default.jpg|https://demo-store.edrone.me/img/p/4/7/47.jpg';
           _edrone.product_urls = 'https://demo-store.edrone.me/index.php?id_product=12&controller=product|https://demo-store.edrone.me/index.php?id_product=13&controller=product';
           _edrone.product_category_ids = '2~3~4|2~3~4';
           _edrone.product_category_names = 'Main~Shoes~Women shoes|Main~Shoes~Women shoes';
           _edrone.product_counts = '1|3';
           _edrone.order_id = '4321';
           _edrone.country = 'UK';
           _edrone.city = 'London';
           _edrone.base_currency = 'GBP';
           _edrone.order_currency = 'GBP';
           _edrone.base_payment_value = '671.50';
           _edrone.order_payment_value = '671.50';
    </script>
    

    Subscribe

    
    <script type="text/javascript">
           _edrone.app_id = '51a97611a3430';
           _edrone.email = 'jonh.doe@edrone.me';
           _edrone.gender = 'M';
           _edrone.birth_date = '1995-02-28';
           _edrone.version = '1.0.0';
           _edrone.action_type = 'subscribe';
           _edrone.platform_version = '3.1.26';
           _edrone.platform = 'custom';
    </script>
    
    

    Data Import

    Orders


    To import historical orders use our endpoint "https://api.edrone.me/trace". Is important to fill "event_utc_date" field.

    
    <?php
    
    $history_orders = '[{
        "email": "johndoe@example.com",
        "event_date": "2018-03-12T08:04:46.241168Z",
        "first_name": "John",
        "last_name": "Doe",
        "gender": "M",
        "birth_date": "1995-02-28",
        "phone": "123123123",
        "order_id": "19626",
        "city": "UK",
        "country": "London",
        "order_payment_value": "166.46",
        "order_currency": "GBP",
        "subscriber_status": "1",
        "customer_tags": ["tag1", "tag2"],
        "ordered_products": [{
            "product_id": "2356",
            "product_image": "https://example.com/img/product_media/2001-3000",
            "product_url": "https://www.example.com/plecaki/le-coq-sportif-plecak-classique-backpack",
            "product_title": "LeCoqSportifPlecakClassiqueBackpack",
            "quantity": "2",
            "product_categories": [{
                "name": "Accessories",
                "id": "227"
              },
              {
                "name": "Bags",
                "id": "331"
              }
            ]
          },
          {
            "product_id": "2339",
            "product_image": "https://example.com/img/product_media/2001-3001",
            "product_url": "https://www.example.com/portfele/le-coq-sportif-portfel-classique-wallet-2",
            "product_title": "LeCoqSportifPortfelClassiqueWallet",
            "quantity": "2",
            "product_categories": [{
                "name": "Accessories",
                "id": "227"
              },
              {
                "name": "Wallets",
                "id": "319"
              }
            ]
          },
          {
            "product_id": "20857",
            "product_image": "https://example.com/img/product_media/2001-3002",
            "product_url": "https://www.example.com/okulary-przeciwsloneczne/okulary-vans-spicoli-4-shade-white-rainbow-m",
            "product_title": "SunGlassesVansSpicoli4Shade",
            "quantity": "2",
            "product_categories": [{
                "name": "Accessories",
                "id": "227"
              },
              {
                "name": "Sun Glasses",
                "id": "328"
              }
            ]
          }
        ]
      },
      {
        "email": "alicebowman@example.com",
        "event_date": "2018-03-12T08:04:46.241168Z",
        "first_name": "Alice",
        "last_name": "Bowman",
        "gender": "F",
        "birth_date": "1996-02-28",
        "phone": "123123123",
        "order_id": "19627",
        "city": "UK",
        "country": "London",
        "order_payment_value": "219.99",
        "order_currency": "GBP",
        "subscriber_status": "",
        "customer_tags": ["tag1", "tag2"],
        "ordered_products": [{
            "product_id": "18783",
            "product_image": "https://example.com/img/product_media/18001-19000",
            "product_url": "https://www.example.com/adidas-originals-2/buty-adidas-stan-smith-women-ftwr-white-2",
            "product_title": "Buty adidas Stan Smith Women",
            "quantity": "1",
            "product_categories": [{
                "name": "Shoes",
                "id": "225"
              },
              {
                "name": "Women",
                "id": "229"
              },
              {
                "name": "adidas originals",
                "id": "238"
              }
            ]
          }
        ]
      },
      {
        "email": "alicebowman@example.com",
        "event_date": "2018-03-12T08:04:46.241168Z",
        "first_name": "Alice",
        "last_name": "Bowman",
        "gender": "F",
        "birth_date": "1996-02-28",
        "phone": "123123123",
        "order_id": "19627",
        "city": "London",
        "country": "UK",
        "order_payment_value": "244.98",
        "order_currency": "GBP",
        "subscriber_status": "",
        "customer_tags": ["tag1", "tag2"],
        "ordered_products": [{
            "product_id": "18261",
            "product_image": "https://example.com/img/product_media/18001-19001",
            "product_url": "https://www.example.com/adidas-originals/buty-adidas-la-trainer-og-collegiate-green",
            "product_title": "adidas LA TRAINER OG",
            "quantity": "2",
            "product_categories": [{
                "name": "Shoes",
                "id": "225"
              },
              {
                "name": "Men",
                "id": "228"
              },
              {
                "name": "adidas originals",
                "id": "237"
              }
            ]
          }
        ]
      }]';
    
    function utcNow() {
        $t = microtime(true);
        $micro = sprintf("%03d", ($t - floor($t)) * 1000000);
        return gmdate('Y-m-d\TH:i:s.', $t) . $micro . 'Z';
      }
    
    function prepTrace($order) {
        $products = $order->ordered_products;
        $product_ids = [];
        $product_titles = [];
        $product_counts = [];
        $product_urls = [];
        $product_images = [];
        $product_category_ids = [];
        $product_category_names = [];
    
        foreach ($products as $product) {
            $single_product_category_ids = [];
            $single_product_category_names = [];
            foreach($product->product_categories as $category){
              array_push($single_product_category_ids, $category->id);
              array_push($single_product_category_names, $category->name);
            }
    
            array_push($product_ids, $product->product_id);
            array_push($product_titles, $product->product_title);
            array_push($product_urls, $product->product_url);
            array_push($product_counts, $product->quantity);
            array_push($product_images, $product->product_image);
            array_push($product_category_ids,  join('~', $single_product_category_ids));
            array_push($product_category_names,  join('~', $single_product_category_names));
    
    
        }
    
        $edroneData = 'version=' . '1.0.0' .
                '&app_id=' . 'YOUR_APP_ID' .
                '&email=' . $order->email .
                '&first_name=' . $order->first_name .
                '&last_name=' . $order->last_name .
                '&product_ids=' . join('|', $product_ids) .
                '&product_titles=' . join('|', $product_titles) .
                '&product_images=' . join('|', $product_images) .
                '&product_urls=' . join('|', $product_urls) .
                '&product_counts=' . join('|', $product_counts) .
                '&product_category_ids=' . join('|', $product_category_ids) .
                '&product_category_names=' . join('|', $product_category_names) .
                '&order_id=' . $order->order_id .
                '&order_payment_value=' . $order->order_payment_value .
                '&base_payment_value=' . $order->order_payment_value .
                '&sender_type=' . 'server' .
                '&base_currency=' . $order->order_currency .
                '&order_currency=' . $order->order_currency .
                '&action_type=' . 'order' .
                '&country=' . $order->country .
                '&city=' . $order->city .
                '&phone=' . $order->phone .
                '&customer_tags=' . join('|', $order->customer_tags) .
                '&subscriber_status=' . '' .
                '&event_utc_date=' . $order->event_date .
                '&utc_time=' . utcNow();
        return $edroneData;
    }
    
    function httpPost($url, $params) {
      $curl = curl_init();
    
      curl_setopt_array($curl, array(
        CURLOPT_URL => $url,
        CURLOPT_POSTFIELDS => $params,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        // CURLOPT_SSL_VERIFYPEER => false,
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_HTTPHEADER => array(
          "cache-control: no-cache",
          "content-type: application/x-www-form-urlencoded"
        ),
      ));
    
      $response = curl_exec($curl);
      $err = curl_error($curl);
    
      curl_close($curl);
    
      if ($err) {
        echo "cURL Error #:" . $err;
      } else {
        echo $response;
      }
    }
    
    foreach (json_decode($history_orders) as $order) {
        httpPost('https://api.edrone.me/trace', prepTrace($order));
    }
    
    

    Event Monitor

    Tool is available in edrone panel after login(control.edrone.me). Choose from menu "Settings" -> "Integrations" -> "Event Monitor". To start, please press button "Clear session and start collecting new data".

    Event monitor is responsible for collecting information about events which come from your store, analyzing and picking up error and warnings.


    Push Domain Configuration

    Default push domain is a subdomain of edrone.me, unique to each client e.g. 55e01cbdc61f8.edrone.me

    Edrone clients have two options to change it:

    1. First option is to change the subdomain part only, e.g 55e01cbdc61f8.edrone.me -> mystore.edrone.me. In this case we do not require additional configuration on client side, please contact our support to set it up.
    2. Second option is to change the whole domain name, e.g. 55e01cbdc61f8.edrone.me -> push.mystore.com. To make it work we require valid SSL certificate issued for the subdomain, i.e. push.mystore.com. Certificate key length can not be longer then 2048 bits (e.g. 4096 bits will not currently work). After receiving proper certificate from you we generete you a unique "URL ADDRESS" which must be added to your DNS records:
      Name: push.mystore.com
      Type: CNAME
      Value: URL ADDRESS

    Cookies set by edrone

    Name Domain Usage Expiry Set By HttpOnly Secure
    ccid edrone.me, api.edrone.me Unique visitor identifier. 100 years Server (trace, open, email_click, push_token_query) No No
    e_dv_$(app_id) api.edrone.me Used to calculate unique daily visitors statistic. Only presence counts (value is discarded). Daily at midnight UTC Server (trace) Yes (since 2017/07/11) Yes (since 2017/07/11)
    edrone_popup shop Used to manage state of the pop-up (how often it should be displayed) Custom (shop decides) Javascript No No
    edrone_push_widget shop Used to manage state of the push widget. It works as a snooze button, i.e. if widget is configured to auto-open, it says how long it should stay closed after user clicks “Close”. 24 hours Javascript No No
    push_action_type_$(url) *.edrone.me Used to cache subscription state for the push notifications (register/deregister) 1 hour Server Yes (since 2017/07/11) Yes (since 2017/07/11)
    PHPSESSID control.edrone.me, admin.edrone.me Session identifier for the PHP application (Mission Control and Admin). Session Server (Mission Control, Admin) Yes (since 2017/07/01) Yes (since 2017/07/01)

    Local storage variables set by edrone

    Name Usage Expiry Notes
    cId Unique user identifier. Not a real HTTP cookie but works just like First Party cookie. - Local storage variables are set independently for HTTP and HTTPS under a shop domain. This acts akin to First Party cookie. Historically it was the first mechanism used by clients.
    recommended_data Include user actions history(represented as JSON format), based on edrone API's events. - -

    Cookies set by other companies

    Name Type Domain Usage Expiry Set By
    AWSELB Cookie (3rd party) *.edrone.me Assigned by ELB for load balancing purposes. Session ELB
    _ga* Cookie (1st Party) edrone.me Google Analytics Per Google policy Javascript
    intercom-id-* Cookie (1st Party) edrone.me, control.edrone.me Intercom Per Google policy Javascript

    Product Feed

    The main purpose of the Product Feed is providing edrone with information on the availability of products in your shop. Besides, the feed can be helpful in:

    • checking the regular price of the product
    • assigning categories to products (one category per product)
    • exceptional, single-use fixing problems in integration in eg. changing product names

    Technically speaking, it is a xml file with very specific structure. Feed should be in one of the standards we do support. We will cover this later.

    The file must be generated automatically by the backend of your store at least once a day. You provide it to us in the form of a url to a file. Eg: https://my.shop.com/gmc-feed.xml. Your store is hosting this file. If you do not know how to set up this file in your store, ask the technical support of your shop platform or your developer. It is crucial, that you do not block access to a file from specific locations, eg. selected countries. In addition, you shall not block access to the file from various IP’s within some time margin.

    NOTE: edrone will not accept files that are:

    • not in form of url, eg. send by email
    • not in one of defined standards (see below)
    • from url which required authorisation
    • password protected
    • not available to download worldwide
    • with mechanism which blocks downloading the file for several hours from different IP’s
    • the only accepted encoding is UTF-8
    • with particularly extensive product descriptions, which cause the files to become very large (> 100 MB)
    • you can include unavailable products with the right flag in the Product Feed, but this is not recommended as it extends the feed processing time

    Standards of the feed:

    Below the sample feed fragments. Shown header and 1 product.

    1. Google Merchant Center (GMC)
    <rss version="2.0">
        <title>My feed</title>
        <link rel="self" href="www.my-shop.com"/>
        <updated>2019-08-01T09:30:01Z</updated>
        <author>
            <name>myShop</name>
        </author>
        <id>/googleshopping.xml</id>
        <channel>
            <item>
                <g:id>ABC2151</g:id>
                <title>This is my product name</title>
                <description>Very nice product</description>
                <g:google_product_category>Another category</g:google_product_category>
                <g:product_type>We > take > category from > here</g:product_type>
                <g:brand>This is producer brand</g:brand>
                <g:mpn>07920</g:mpn>
                <g:gtin>7898920068216</g:gtin>                       
    <link>https://www.my-shop.com/product-url-30ml/p?idsku=215196140</link>
    <g:image_link>https://my-shop.com./image/ids/496848_2.jpg</g:image_link>
                <g:price>49,90 USD</g:price>
                <g:sale_price>39,90 USD</g:sale_price>
                <g:sale_price_effective_date>2016-02-24T13:00-0800/2016-02-29T15:30-0800</g:sale_price_effective_date>
                <g:availability_date>2016-11-25T13:00-0800</g:availability_date>
                <g:expiration_date>2016-02-24</g:expiration_date>
                <g:availability>in stock</g:availability>
                <g:condition>new</g:condition>
                <g:complementary_product_ids>DEF3151~GHI4151~JKL5151</g:complementary_product_ids>
            </item>
    ...
    
    1. www.ceneo.pl (CENEO)
    <offers version="1">
        <group name="other">
            <o id="ISC6020000613" url="https://www.my-shop.com/product-url-30ml/p?idsku=215196140" price="39,02 PLN" weight="0.0300" stock="1" avail="1">
                <cat>We/take/category from/here</cat>
                <name>This is my product name</name>
                <desc>What a lovely product</desc>
                <imgs>
                    <main url="https://my-shop.com./image/ids/496848_2.jpg"/>
                    <i url="https://my-shop.com./another-image/ids/496848_2.jpg"/>
                </imgs>
                <attrs>
                    <a name="Producent">This is producer brand</a>
                    <a name="Kod_producenta">ISC6020000613</a>
                    <a name="Pojemnosc">30 ml</a>
                    <a name="namePl">Some other attribute</a>
                    <a name="sale_price">29,02 PLN</a>
                    <a name="sale_price_effective_date">2016-02-24T13:00-0800/2016-02-29T15:30-0800</a>
                    <a name="availability_date">2016-11-25T13:00-0800</a>
                    <a name="expiration_date">2016-02-24</a>
                    <a name="complementary_product_ids">ABC7020000613~DEF8020000613~GHI9020000613</a>
                </attrs>
            </o>
    ...
    
    1. www.iai-shop.com (IAI)
    <offer file_format="IOF" version="3.0" generated_by="IdoSell Shop" generated="2019-08-01 11:01:19" expires="2019-08-02 11:01:19" extensions="yes">
        <products language="pol" currency="PLN">
            <product type="regular" id="7002" vat="23.0" producer_code_standard="GTIN12" code_on_card="FUND-001 / 375833-010" site="6" currency="PLN">
                <producer id="24" name="Brand of product"/>
                <category id="1236067664" name="We > take > category from > here"/>
                <unit id="0" name="szt."/>
                <card url="https://www.my-shop.com/product-url-30ml/p?idsku=215196140"/>
                <description>
                    <name type="name" xml:lang="pol">This is product name</name>
                    <short_desc xml:lang="pol">What a lovely product</short_desc>
                    <long_desc xml:lang="pol">What a lovely product. What a lovely product. What a lovely product. </long_desc>
                </description>
                <iaiext:delivery_time unit="day" value="1"></iaiext:delivery_time>
                <iaiext:visibility></iaiext:visibility>
                <price gross="64.99" net="52.84"/>
                <srp gross="0" net="0"/>
                <strikethrough_retail_price gross="119.99" net="97.55"/>
                <strikethrough_wholesale_price gross="119.99" net="97.55"/>
                <iaiext:price_retail>
                    <iaiext:site id="6" size_id="0" gross="64.99" net="52.84"/>
                </iaiext:price_retail>
                <iaiext:price_wholesale>
                    <iaiext:site id="6" size_id="0" gross="64.99" net="52.84"/>
                </iaiext:price_wholesale>
                <iaiext:price_minimal>
                    <iaiext:site id="6" size_id="0" gross="0.01" net="0.01"/>
                </iaiext:price_minimal>
                <promotion name=""/>
                <iaiext:hotspots></iaiext:hotspots>
                <sizes></sizes>
                <images>
                    <large>
                        <image url="https://my-shop.com./image/ids/496848_2.jpg" changed="2013-01-02 00:00:00" hash="2dbbdb78f4f5f42bb65d4ffa96f53501" width="800" height="800"/>
                    </large>
                </images>
            </product>
    ...
    

    When we will not show PopUp again to the same customer?

    Scenario 1:

    • Popup is displayed to customer
    • Customer performs interactions (subscribes to newsletter or closes popup)
    • Afterwards we mark customer with edrone_popup cookie, which TTL (time to live) is set in the exit-popup settings Popup display frequency settings
    • Popup will not be displayed to this customer again - as long as edrone_popup cookie will be present

      Scenario 2:

    • If all of Below conditions are true
      • user is logged in
      • user has subscribed to newsletter status in the shop
        • that might be achived by:
          • agreeing to newsletter during account creation
          • changing that status in shop user settings
          • Subscribing to edrone newsletter, when shop has active syncing subscription status
      • platform sends current subscription status in trace (currently supported in Magento1, Magento2, Shopify)
    • In this case user is marked with cookie edrone_subsribed with TTL set to 100 days
    • Popup will not be displayed to this customer again - as long as edrone_subsribed cookie will be present

    Other information

    Google Tag Manager


    Currently not supporting

    In case implementing edrone integration on test enviroment, after publishing integration to production create new edrone account and use new app_id.

    Log in

    Log in Forgot password? ×

    edrone 30 days free trial

    no credit card required

    Join us Forgot password? ×