Shopify

A leading cloud-based, multichannel commerce platform designed for small and medium-sized businesses.

To integrate your Shopify store, you can use the official built-in plugin. Just navigate to your Plugins section of your merchant panel and configure the plugin after activating it.

Besides the Affberry you will also need a private app in your Shopify account.
Login to your Shopify admin panel and navigate to Apps> Manage private apps (a link at the bottom). Create a private app and name it e.g. “Affberry”. The private app needs to have Read and Write permissions for the “Script tags, the rest of the permissions can stay default. When done use it’s credentials when setting up the plugin in merchant panel.

1.Login and navigation

Login to your admin panel. Navigate to Settings> Checkout and scroll down to Additional Content & Scripts in the section Order processing.

2.Code

The sale tracking code to track one commission per order is this:

<script src="https://yourname.affberry.com/sales/sale.js" type="text/javascript"></script>

<script type="text/javascript">
if (window.location.href.indexOf('/thank_you') > 0)
{
var accountid = 2;
var campaignid=5;
var currencycode='USD';
var pluginc = '7';//dont change this
var trackurl = 'https://yourname.affberry.com/';
var cost = '{{subtotal_price | money_without_currency | replace: ',', '' }}';
var orderid = '{{order_number}}';
var productid = '{{checkout.line_items[0].product_id }}';
register(accountid,campaignid,cost,orderid,productid,currencycode,pluginc,trackurl);
}
</script>

And now just save it and you are ready to track the sales now.