How to track which storefront an order came from

Since your online store can be easily installed at several locations at the same time, you'll probably prefer to create several storefronts. For example, you could have:

 

  1. the "main" store placed on your site,
  2. the store on your FB fan page,
  3. the store on your blog pages.

As they all are instances of your store, all the orders will be listed on the My Sales → Orders page in your Control Panel. However, you can be interested in finding order sources, for example, in order to find out what storefront is more efficient. 

In this article:

  1. Add a definition of special ID ('Affiliate ID') in your integration code
  2. Find corresponding storefront IDs in order details in your control panel

Add a definition of special ID ('Affiliate ID') in your integration code

Insert the following line:

between these parts of the code:

and

So, for example, it may look like this:

In the codes above, the 'affiliate_id' string should be replaced with an ID (any string you want) that you decide to mark a storefront with. For example:

or

Find corresponding storefront IDs in order details in your control panel

All placed orders will be marked with an assigned affiliate ID. You can find this id in order details in your Control Panel. Also, the IDs appear in a CSV file with exported orders. So you can use the results these ways:

  • track order sources manually in your store control panel,
  • export all your orders and process the data in an Excel or Google Docs Spreadsheets,

By the way, the described tool can also be used for affiliate marketing — just give your store integration code with an assigned affiliate ID to your affiliate so that your whole store will be displayed on their site. You will be able and track sales coming from their sites by this ID.

    --------------------------