
Configuring e-commerce/shopping cart tracking
This section contains instructions, information and tips for e-commerce/shopping cart tracking and analysis.
General
In addition to normal website tracking, the shopping carts of your own shop can be analysed.
For this to work, each time a visitor to the shop purchases the contents of the shopping cart or makes another order for which there is a charge, one or two additional parameters are transferred to the pixel-code: 'wm_basket' and 'wm_sales'.
This allows the shopping cart or the sold products to be analysed according to various categories in e-commerce/shopping cart analysis. You can find details on integrating the parameters into websites in 'Technical info for extending the pixel-code' below. Details on configuring the analysis can be found under 'Configuring the analysis'.
Technical info on extending the pixel-code
In order to be able to use e-commerce and shopping cart tracking, the 'wm_basket' and 'wm_sales' parameters have to be included in the pixel-code. These parameters have to be added in the pixel-code between the lines '// Begin own parameters' and '// End own parameters'. The values for these parameters ('wm_basket' and 'wm_sales') are also set there in the pixel-code. Remember to insert the parameters in the <noscript> part of the pixel-code. These have to be URI-coded (see Integrating the pixel-code for information on URI coding). We'll show you how this is done in a sample code further down. The following example shows how the parameters can be filled in the pixel-code.
| Example: |
|---|
// Begin own parameters |
Sales tracking with the 'wm_sales' parameter
The 'wm_sales' parameter makes sales tracking or sales analysis very easy. Every time a visitor makes a commitment to purchase or order something from the website, the 'wm_sales' parameter simply has to be set (as described above) and the (total) sales has to be specified for this order, e.g. 'wm_sales=17.99'. (Note: You have to use a decimal point. Wrong: 'wm_sales=17,99'!). It doesn't matter which currency you use or whether the sum is gross or net – just be consistent!
| Example: |
|---|
// Begin own parameters |
Shopping cart tracking with the 'wm_basket' parameter
With the 'wm_basket' parameter it is possible to specify the individual purchased or ordered items, their prices and, optionally, their quantity. To do this, only the 'wm_basket' parameter has to be included in the pixel-code for the web page (as described above) that follows a (binding) purchase or order for the items (e.g. a confirmation page).
| Example: |
|---|
// Begin own parameters |
The values for the 'wm_basket' parameter consist of several individual values, namely the details for the individual items (provided there is more than one item); separated by semi-colons (;).
| Example: |
|---|
wm_basket=ITEM1;ITEM2;ITEM3;... |
Each item detail 'ITEM' is made up in turn of the item description, the price and, optionally, the quantity, separated by a colon (:).
| Example: |
|---|
ITEM := ITEM NAME:price:quantity |
Quantity indicates how many of these items are purchased each time. If there is only one item, the details can be omitted. The price must be the (total) amount for this item, given with a decimal point (e.g. '17.99'). Just as for 'sales =...' (see above), it doesn't matter which currency you use or whether the sum is gross or net. But it is important to be consistent.
Please note: In the event that the quantity is more than 1, the price always shows the total amount for this item.
Example: A customer buys three books, each with a unit price of 17.99. '53.97' (=3 x 17.99) is given as the price for this item in the basket parameter.
The ITEM NAME can be simply the item name or may first list the category and then the item name. This information is separated by vertical bars (|).
| Example: |
|---|
ITEM NAME := Category|Sub-category1|Sub-category2|...|Item name |
You can specify as many (sub)categories as you like. However, only the first 4 (plus the final item name at the end of the list) are taken into account. Furthermore, you should always use the same number of (sub)categories and make sure they match. If books and CDs are being sold in the shop, for example, and you want to include the genre, author or artist, you might use the following format:
| Possible format: |
|---|
MEDIUM|GENRE|ARTIST|ITEM |
A mixture or varying number of categories would be incorrect, however:
| Examples of what not to do: |
|---|
Literature|Goethe|Faust (Different number of categories, as the medium 'book' |
One final example will help to clarify the parameter once again.
Let’s say a visitor makes a purchase in a shop:
2 CDs (Help) by The Beatles for 17.99
and
Faust by Goethe as a book for 19.99.
Then the parameter 'basket=...' would appear as follows in the pixel-code:
wm_basket=CD|Pop|Beatles|Help:35.98:2;book|literature|Goethe|Faust:19.99:1
Examples of exactly where these additions have to be made in the pixel-code can be found further below in this section.
Configuring analyses
To be able to carry out a shopping cart analysis, you first have to compile the required analysis. Select 'Add' (
) to get to the Configuration menu. You can return by clicking 'Back to analysis'. (Save your changes before you leave.)
First, give your analysis a name (e.g. 'analysis by genre and artist').
Then define which category is to be analysed as the top category and what further categories should be analysed afterwards. The choice is completely free and does not have to be based on the sequence in the pixel-code. You might configure an analysis where genre is the top category (e.g. 'literature, 'novel', 'non-fiction' or 'pop', 'rock', 'classical') and the subcategories are the various artists (or authors) and then the actual items (i.e. book title or CD title).
All items can also be analysed completely without grouping by category. This option is the only one available if no categories have been entered into the pixel-code.
Example:
| Example: |
|---|
Level 1 category: Category 1 (book, CD, ...) |
The first thing you see in the analysis is how many books and CDs have been sold.
For example:
Books 61 1113.56
CDs 47 845.53
If you now click 'books', you will be given a list of books sold broken down by genre, e.g.
Literature 34 508.55
Novel 18 317.93
Non-fiction 9 287.08
Clicking 'literature' delivers the books sold in the 'literature' category:
Goethe 21 157.92
Schiller 13 96.76
Clicking Goethe again finally shows the books by Goethe that have been sold:
Faust 17 339.83
The Sorrows of
Young Werther 4 71.96
Please note:
· The server first needs to have received data before you can configure and perform a shopping cart analysis.
· Be sure to save your changes every time you alter the configuration settings!
Examples of codes:
Below you'll find a sample code. The 'wm_sales' or 'wm_basket' parameters were inserted in the relevant pixel-code, completed with typical content and highlighted.
| Additions in the pixel-code: |
|---|
<!-- WiredMinds eMetrics tracking with HotTracker V3.0 START --> |
