Skip to main content

Installation

Add edrone tracking to your store in under 5 minutes.

Prerequisites

Before you begin, you'll need:

  • Your App ID from Mission Control
  • Access to your store's HTML template or tag manager

Step 1: Add the initialization script

Add this script to the <head> section of every page on your store:

<script type="text/javascript">
(function (appId) {
window._edrone = window._edrone || {};
_edrone.app_id = appId;
_edrone.platform = 'custom';
_edrone.version = '1.0';
var doc = document.createElement('script');
doc.type = 'text/javascript';
doc.async = true;
doc.src = "https://d3bo67muzbfgtl.cloudfront.net/edrone_2_0.js?app_id=" + appId;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(doc, s);
})("YOUR_APP_ID");
</script>
Replace YOUR_APP_ID

Replace YOUR_APP_ID with your actual App ID from Mission Control.

Version field

The version field helps with diagnostics and tracking changes to your integration. Update it when you make significant changes to your tracking implementation - this makes it easier to identify issues and correlate them with specific versions of your code.

Step 2: Verify installation

After adding the script:

  1. Open your store in a browser
  2. Open Developer Tools (F12)
  3. Go to the Network tab
  4. Look for requests to api.edrone.me

You should see a successful request, confirming the script is working.

Multi-language stores (advanced)

For stores with multiple languages/currencies, use a separate App ID for each:

<script type="text/javascript">
var current_app_id = '';

// Detect language and set appropriate App ID
switch(document.documentElement.lang) {
case 'pl':
current_app_id = 'POLISH_APP_ID';
break;
case 'en':
current_app_id = 'ENGLISH_APP_ID';
break;
case 'de':
current_app_id = 'GERMAN_APP_ID';
break;
default:
current_app_id = 'DEFAULT_APP_ID';
}

(function (srcjs) {
window._edrone = window._edrone || {};
_edrone.app_id = current_app_id;
_edrone.platform = 'custom';
_edrone.version = '1.0';
var doc = document.createElement('script');
doc.type = 'text/javascript';
doc.async = true;
doc.src = srcjs;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(doc, s);
})("https://d3bo67muzbfgtl.cloudfront.net/edrone_2_0.js?app_id=" + current_app_id);
</script>

Next steps

Now that tracking is installed, learn how to send your first event.