Visitor Stats 2 logo Tracking Website Sales.
 

Automatically import website sales into Visitor Stats 2

 

Visitor Stats 2 has a very unique feature, the ability to track a visitor from their first visit until they become a customer.

This gives you invaluable information about your website sales, where they are coming from, what country they are from, the keywords they used to find your website and more.


The 'Sales' area of Visitor Stats provides a good overview of sales on your website


You can view sales per day, week, month or a custom timeframe to accommodate everyones needs.

 
Some of the great information you can get
 

Most popular sold items:


Most valuable referrer (Google, Direct Request):


Most valuable keywords (from all search engines):

Order Detail:

Other ideas I am working on include a summary of the demographic, language used, what visit most sales occur on (1st, 2nd visit etc).

 

Automatically importing sales

 

Just place two lines of code above the Visitor Stats 2 include line. I use this on my 'thankyou.php' page, after the sale has gone through, and I still have access to all the relevant sale information.

The code:


This adds an order of $79.95 into Visitor Stats, which also records all the visitor data, such as country, language, visits etc.

All you have to do now is check your Visitor Stats admin for sales!

 

Importing multiple items

To add more than one item, we need to add a few more lines of code.

To use, insert this code into your page (before the Visitor Stats include). You can use arrays, and you must put in all feilds.
$vs_order="order"; OR use your order id: $vs_order=$customer_order_id;
$vs_item_qty=$quantity_ordered_of_this_item;
$vs_item_name=$name_of_item_ordered;
$vs_item_price=$price_of_item_ordered;


 

Testing Multiple Orders

Test this using a quick array (put before the code above):


Open your browser and go to the page you put the import sales code on (usually the 'thank you' page).

Then open your Visitor Stats Admin and check that your sales worked ok.

 
Extra ideas I use on my websites
 

Mark your Visitor as 'Customer'
I do this so I can spot a customer on the other sections of my website, as they appear with the name 'Customer' in bold. Read the full tutorial, or use the code below:

The code (before the include line):

 

Email yourself for each sale
My preferred method of watching sales, as I get an email alert with a link to the Visitor Profile.

The code:

You will have to replace 'yourdomain.com' with your own website, but basically this emails you every time an order is placed, and provides a link to the customers profile in Visitor Stats 2.

It's really exciting watching your orders coming in, as I usually only check my stats once or twice a day, but this emails me whenever anyone orders!

 

I hope you have enjoyed this tutorial, if you have any suggestions for future articles, please email me.

 
Buy Visitor Stats
Version 2 for $79.95
Live Demo
Watch real visitors