Ecwid Conversion Tracking

This article will show you how to track sales from your Ecwid shopping cart to Everflow.

peter kurjanowicz avatar
Written by peter kurjanowicz
Updated over a week ago

Overview

Ewcid provides eCommerce tools for merchants, and this integration is as simple as placing two pieces of code inside of Ewcid.

The code below is referencing this article from Ewcid - [Click Here]

Please note that this integration requires a premium Ewcid account and will not work with the free version.


Step #1: Everflow Data Prep

  • Copy your Tracking Domain and Advertiser ID (aid) so that you may place it in the code later.

  • You can find the Advertiser ID (aid) on the General card on an Offer page. In this example, the aid is 139.

Please note that your Tracking card could look different if Javascript SDK is not selected as the Conversion Method. If so, edit the the Conversion Method before moving on by navigating to Edit > Attribution > Conversion Method: Javascript SDK.

Step #2: Ecwid Click Code Setup

  • Copy the following code so that you may paste it into Ewcid. Be sure to replace INSERT_TRACKING_DOMAIN with the tracking domain you copied in Step #1.

<script type="text/javascript"
src="INSERT_TRACKING_DOMAIN/scripts/sdk/everflow.js"></script>

<script type="text/javascript">
EF.click({
offer_id: EF.urlParameter('oid'),
affiliate_id: EF.urlParameter('affid'),
sub1: EF.urlParameter('sub1'),
sub2: EF.urlParameter('sub2'),
sub3: EF.urlParameter('sub3'),
sub4: EF.urlParameter('sub4'),
sub5: EF.urlParameter('sub5'),
uid: EF.urlParameter('uid'),
source_id: EF.urlParameter('source_id'),
transaction_id: EF.urlParameter('_ef_transaction_id'),
});
</script>

Below is an example of the code with a sample domain:

<script type="text/javascript"
src="https://www.serve-eflow-test.com/scripts/sdk/everflow.js"></script>

<script type="text/javascript">
EF.click({
offer_id: EF.urlParameter('oid'),
affiliate_id: EF.urlParameter('affid'),
sub1: EF.urlParameter('sub1'),
sub2: EF.urlParameter('sub2'),
sub3: EF.urlParameter('sub3'),
sub4: EF.urlParameter('sub4'),
sub5: EF.urlParameter('sub5'),
uid: EF.urlParameter('uid'),
source_id: EF.urlParameter('source_id'),
transaction_id: EF.urlParameter('_ef_transaction_id'),
});
</script>
  • Navigate to Website > Design and paste the code with your domain in the SEO settings section:

Step #3: Ewcid Conversion Code Setup

  • Copy the following code so that you may paste it into Ewcid. Be sure to replace INSERT_ADVERTISER_ID with the Advertiser ID you copied in Step #1.

<script>
<#noescape>
var order = {"oid": '${order.number}', "items": []}
<#list order.items as orderItem>
var a = {};
a.ps = '${orderItem.sku}';
a.p = '${orderItem.subtotal}'.replace('$','').replace(/\s/g, '');
a.qty = '${orderItem.quantity}';
order.items.push(a)
</#list>
EF.conversion({
aid: INSERT_ADVERTISER_ID,
amount: '${order.subtotal}'.replace('$','').replace(/\s/g, ''),
email: '${customer.email}',
coupon_code: '${order.couponCode}',
order_id: '${order.number}',
order : order
});
</#noescape>
</script>

Below is an example of the code with a sample aid:

<script>
<#noescape>
var order = {"oid": '${order.number}', "items": []}
<#list order.items as orderItem>
var a = {};
a.ps = '${orderItem.sku}';
a.p = '${orderItem.subtotal}'.replace('$','').replace(/\s/g, '');
a.qty = '${orderItem.quantity}';
order.items.push(a)
</#list>
EF.conversion({
aid: 139,
amount: '${order.subtotal}'.replace('$','').replace(/\s/g, ''),
email: '${customer.email}',
coupon_code: '${order.couponCode}',
order_id: '${order.number}',
order : order
});
</#noescape>
</script>
  • Navigate to Settings > General and find the section labeled: Custom tracking code on Order Confirmation page. Be sure the Tracking code is enabled, click Edit Code and paste the code with the proper Advertiser ID.


Did this answer your question?