# Integrate your e-commerce platform
edrone is a marketing tool aimed at e-commerce platforms to support online stores in sales processes. Its offer includes solutions for marketing automation, email marketing, and CRM (Customer Relationship Management), among others. The functioning of the tool is based on the integration of the e-commerce platform (where the online store is based) with edrone. Thanks to the integration, you can identify and monitor users, store data in cookies and cache files, display onsite elements (popups, recommendation frames, chat, social-proof widgets) and send product data based on user interactions.
# How integration works
The integration of the platform is based on the implementation of the following scripts:
- Initialization code, which must be on each subpage of the store, e.g. in the head section of the HTML code
<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';
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>
- Events that relate to particular places on the page (product page, category page, order page) and send information about products, and users. The data can be retrieved from the store or directly from the platform via API.
You should implement the integration on the front-end side of the website. Sending events on the backend will make it impossible to identify and monitor the customers. What is more, you will have a reduction in the available edrone functionalities, which are based on real-time data retrieved from events.
# Backend
It is possible to send data to our system using backend technologies. This can be particularly useful if you want to import historical orders or customer base directly from an e-commerce platform or other sales channel. The events you can additionally send on the backend are:
Also associated with the backend is subscription status synchronization, which allows you to update your newsletter subscription status from edrone to your platform. More information can be found here
# Consents
One of edrone's essential functions is to identify and monitor users, and data about them is stored in cookies and browser cache. If your platform has a dedicated widget through which users can consent to the processing of their data, then information about integration with the edrone system must also be included there.
# Available approaches
# Integration templates
# Online stores
The main goal for the integration is to send all available information used by edrone from the online store. To do this, you need to implement the events presented in the Events section, on the individual pages of the site.
# Multilingual stores
In case the store has several language versions and allows payment in multiple currencies, each of them must have a separate integration because the data is sent through the front-end frontend in different languages and with the wrong currency. This will result in unreliable information in reports and, emails with products in various languages and prices.
To differentiate between the language versions of the store, modify the initialization code so that the value of the app_id field changes depending on the language the user has selected.
<script type="text/javascript">
var current_app_id = ''
switch(lang){*
case 'PL':
current_app_id = 'POLISH APP_ID'
case 'EN':
current_app_id = 'ENGLISH APP_ID'
case 'DE':
current_app_id = 'GERMAN APP_ID'
}
(function (srcjs) {
window._edrone = window._edrone || {};
_edrone.app_id = current_app_id;
_edrone.version = '1.0.0';
_edrone.platform_version = '1.0.0';
_edrone.platform = 'custom';
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>
# Landing pages
Landing pages are very often used to build a subscriber base, and they do not necessarily have to be under the same domain.
To integrate them, you need to insert initial code, as well as plug the existing form on the landing page using the Subscribe event
# Unsubscribe the customer
One of the events- 'Subscribe' allow you to change the subscription status of a given user. It has a parameter 'subscribe_status', which takes the value 1- subscribed or 0- unsubscribed. To change a user's status to subscribe, we can send such an event using a script implemented on the frontend or backend side, while unsubscribing a user, i.e. changing the value to 0, can only be sent on the backend side
<?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, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
httpPost('https://api.edrone.me/trace', subscriptionChange());
# When feed is needed
Product feed allows us to update product information in real-time, and it is most often used in email marketing and recommendation frames, because of the up-to-date data on product availability, as well as its price. An additional advantage of using a product feed is the ability to add product categories that are not on the store page. This can be especially useful if you want to build cross-selling or upselling campaigns.
# Google Tag Manager
GTM (Google Tag Manager) is a free tool that allows us to manage scripts by easily adding code snippets to a website or application.
Installing Google Tag Manager is quick and easy. Go to tagmanager website (opens new window) and create a new account and container.
# Additional features
# Syncing subscription statuses
If you want edrone to send updated email and SMS subscription statuses into your platform, check the subscription status sync
# Submit the integration
If you would like your platform integration to be visible on our integration list (opens new window), please contact us at partners@edrone.me