WS-Tracking (EN)
What is tracking or analytics data?
WEBSALE transmits certain shop data to external systems in real time for further processing. This data is the basis for all shop-specific statistical evaluations.
No personal data is transmitted, but only general data such as
displayed page (name of the page)
displayed category (category name)
displayed article (article name and article number)
Ordered article (article name, article number, quantity and price)
Zip code, city and country of billing and delivery address
Payment method and delivery
etc.
Data interface
WEBSALE passes the data in JavaScript variables, which in turn can be read and processed by JavaScript. The JavaScript that processes the transferred variables is usually created by the external service provider.
On each page generated by WEBSALE, the shop system sets the corresponding JavaScript variables.
The general structure is as follows:
<html>
<head>
...
</head>
<body>
...
...
<script language="JavaScript">
<!--
var ws_state="Start";
var ws_page_name="Home";
var ...
...
//-->
</script>
<script src="<JavaScript file>" type="text/javascript"></script>
</body>
</html>
At the end of the HTML page, the corresponding code parts of WEBSALE are inserted. First, the JavaScript variables are set there by WEBSALE. Then a JavaScript file is called, which reads the values set by WEBSALE, processes them and sends them to the external system.
The JavaScript is usually created by the external service provider.
Description of the variables
On each page the variable "ws_state" is set, which indicates the status or state. Depending on this variable, other variables follow.
Net/gross prices
In a net shop, all prices or costs (except ws_basket_total) are displayed in net (excluding VAT). In a gross shop, all prices or costs are output in gross (including VAT).
Some costs (value of goods, grand total, etc.) are output in net and gross.
Standard variables
Standard variables are output on every page and can be empty.
Variable | Meaning |
---|---|
ws_state | Status or state the shop is in when the page is displayed. |
ws_shopid | The shopID is assigned by WEBSALE and exists for each WEBSALE shop. |
ws_subshopid | The SubshopID is assigned by WEBSALE and exists for each WEBSALE shop. Subshops are used e.g. for additional shop languages, but can also represent an end customer shop (B2C) or a dealer shop (B2B). |
ws_sid | Session ID of the shop This 32-character ID is generated uniquely for each shop visit. It can be used to measure the exact number of visits. |
ws_extid | This optional ID is assigned by an external service provider. |
ws_page_name | Name of the displayed shop page, e.g. "shopping cart". |
ws_data_type | Possible values: |
ws_order | Possible values: |
ws_referer | Will be passed optionally when calling the shop z. E.g. "...&ref=google" |
ws_subreferer | Additional information about the referer Is optionally transferred with the call of the shop z. E.g. "...&subref=banner26" |
ws_http_referer | HTTP referer. Complete URL from which the shop was called Please note: |
ws_login_type | Current state of the login/registration Possible values: |
ws_tp1 | An optional parameter (maximum 128 characters), which can be passed additionally when calling the shop (with "&ws_tp1=..."). |
ws_tp2 | Meaning and handling as for "ws_tp1". |
ws_tp3 | Meaning and handling as for "ws_tp1". |
ws_gclid | Optional GoogleClickID (max. 64 characters), which can be passed additionally when calling the shop (with "&gclid=..."). |
ws_test | Possible values: |
ws_userindex_md5 | MD5 hash (16 bytes, 32 characters) of the user index. The UserIndex is a unique ID when a user logs in or registers in the shop. This ID is assigned only once and remains constant for a user over the entire period. For non-registered users this parameter is empty. |
ws_email_md5 | MD5 hash (16 bytes, 32 characters) of the email address. This value will be output only if the shop knows the e-mail address of the orderer. |
ws_price_type | Values: |
ws_currency | Currency code according to ISO 4217, e.g. "EUR" for Euro |
ws_currency_display | Optional target currency according to ISO 4217, if several subshops work with different currencies |
ws_exchange_rate | Optional exchange rate, related to the target currency. Example: |
Table of possible states
State "ws_state | Description | additional variables |
---|---|---|
Start | Start page | Â |
Category | Display a category | ws_cat_name (name of the category) |
Product | Display of an article | ws_cat_name |
Basket | Display the basket | Â |
AddBasket | One or more items were added to the basket | ws_add_basket_positions (Number of added items) ws_add_basket_mainpositions (Number of added main items in the basket, considers all items except hidden items and set subproducts) ws_add_basket_quantities (number of added items) ws_add_basket_mainquantities (number of added main items in the basket, considers all items except hidden items and set subproducts) The following information will be output when ws_data_type=advanced! ws_add_basket_subtotal (value of added items) ws_add_basket[i][1] (Item number) ws_add_basket[i][2] (item name) ws_add_basket[i][3] (Price) ws_add_basket[i][4] (Quantity) ws_add_basket[i][5] (Category path) ws_add_basket[i][6] (Product index) ws_add_basket[i][7] (VAT rate, e.g. "19") ws_add_basket[i][8] (Total amount) ws_add_basket[i][9] (Set top product yes/no) ws_add_basket[i][10] (Set subproduct yes/no) ws_add_basket[i][11] (hidden position yes/no) i=1 ... n n= number of items in basket |
DelBasket | One or more items were deleted from the basket | ws_del_basket_positions (Number of deleted positions) ws_del_basket_mainpositions (Number of deleted main items in the basket, considers all items except hidden items and set subproducts) ws_del_basket_quantities (Number of deleted quantity) ws_del_basket_mainquantities (number of deleted main items in the basket, considers all items except hidden items and set subproducts) The following information will be output when ws_data_type=advanced! ws_del_basket_subtotal (value of goods of deleted items) ws_del_basket[i][1] (Article number) ws_del_basket[i][2] (item name) ws_del_basket[i][3] (Price) ws_del_basket[i][4] (Quantity) ws_del_basket[i][5] (Category path) ws_del_basket[i][6] (Product index) ws_del_basket[i][7] (VAT rate, e.g. "19") ws_del_basket[i][8] (Total amount) ws_del_basket[i][9] (Set top product yes/no) ws_del_basket[i][10] (Set subproduct yes/no) ws_del_basket[i][11] (hidden position yes/no) i=1 ... n n= number of items in basket |
Address | Input of the billing address | Â |
DelivAddress | Input of a different delivery address | Â |
PayDeliv | Specification of the payment method and delivery | Â |
Conditions | Display of the terms and conditions page | Â |
PlaceOrder | Order overview, send order | Â |
Confirm | Confirmation page | The following information will be displayed if ws_data_type=advanced! ws_order_number (Unique order number) ws_basket_positions (Number of positions in the basket) ws_basket_mainpositions (Number of main items in the basket, considers all items except hidden items and set subproducts) ws_basket_quantities (Number of items in the basket) ws_basket_mainquantities (Number of main items in basket, considers all items except hidden items and set subproducts) ws_basket_subtotal (value of goods, gross or net) ws_basket_subtotal_net (value of goods, net) ws_basket_subtotal_gross (Gross value of goods) ws_basket_total (total, always gross) ws_basket_total_net (total net) ws_affiliate_provider (Name of the affiliate provider) ws_affiliate_partner_id (Affiliate partner ID) ws_delivery_name (Delivery name) ws_delivery_cost (Delivery cost) ws_payment_name (Payment method name) ws_payment_cost (Cost of payment method) ws_total_discount (total discount given) ws_a_zip (postal code of the billing address) ws_a_city (city of the billing address) ws_a_country (country of the billing address) ws_a_number (MD5 hash of the customer number) ws_d_zip (Postal code of the dev. delivery address) ws_d_city (City of the different delivery address) ws_d_country (Country of the different delivery address) ws_basket[i][1] (Item number) ws_basket[i][2] (item name) ws_basket[i][3] (Price) ws_basket[i][4] (Quantity) ws_basket[i][5] (Category path) ws_basket[i][6] (product index) ws_basket[i][7] (VAT rate, e.g. "19") ws_basket[i][8] (Total amount) ws_basket[i][9] (Set top product yes/no) ws_basket[i][10] (Set subproduct yes/no) ws_basket[i][11] (hidden position yes/no) ws_basket[i][12] (commission info) ws_basket[i][13] (AdditionalInput fields) {
"additionalinput1" : "value1",
"additionalinput2" : "value2"
...
} ws_basket[i][14] (ExtraInput fields) {
"extrainput1" : "value1",
"extrainput2" : "value2"
...
} ws_basket[i][15] (free fields in basket) ws_basket[i][16] (number of used addresses of the item (if MultiALA)/empty, if MultiALAs not used) i=1 ... n Optional costs for climate-neutral production Optional costs for Web2Print |
ProductRecmd | Recommend article | ws_cat_name |
ProductRecmdConfirm | Recommend article confirmation | ws_cat_name |
Voucher | Page Enter voucher number | Â |
Notify | General notification page | ws_notify_msg (text of the notification) |
OrderHistory | Page shopping cart history (order history) | Â |
Search | Search results | ws_search_phrase (search phrase) ws_search_results (number of hits of the search) |
MemoList | Show memo list | Â |
PrintConfirm | Print view of the confirmation page | Â |
Login | Login or registration in the shop | ws_login_error (Error during login/registration) na: Login page was called error: General error uid_pw: Invalid user ID or password for existing customer login new_uid: UserID already exists at registration or is wrong at new customer registration new_pw: Wrong password at a new customer registration change_uid: UserID already exists or is wrong at "Change UserID change_pw: Password is wrong at "Change password |
UserAccount | Customer account | Â |
Template | Any template | ws_template_name |
DirectOrder | Direct order | Â |
Logout | Logout | Â |
Notes about the parameters:
ws_affiliate_provider
Name of the affiliate provider. Currently WEBSALE supports the following operators:
Adbutler
Affilinet
Awin (formerly Zanox)
TradeDoubler
Please note:
The parameter is only set if the corresponding affiliate operator has been activated for your shop. Please contact WEBSALE AG for this.
ws_affiliate_partner_id
The PartnerID, which was used to access the shop. The commission is paid to this affiliate ID.
WEBSALE keeps the affiliate ID in a cookie for 4 weeks for possible follow-up orders.
The parameter "ws_affiliate_partner_id" corresponds to the following transfer parameter of the operator:
Operator | transfer parameter of the operator |
---|---|
Adbutler | fp |
Affilinet | ref |
Awin (formerly Zanox) | PartnerID |
TradeDoubler | tduid |
Please note:
The parameter is only set if the corresponding affiliate operator has been activated for your shop. Please contact WEBSALE AG for this.
Product index
The product index is a variant-independent, unique index per article. An article number, on the other hand, can change per variant.
Example: Pants with variants
Color | Size | Item number | Product index |
---|---|---|---|
red | 42 | 12345-1 | 24-2333 |
red | 43 | 12345-2 | 24-2333 |
blue | 42 | 12345-3 | 24-2333 |
Examples
Default parameters on all pages
Calling the start page
Displaying a category
The full path separated by "/" is always displayed as the category name.
Display of an article
Add an item with quantity 3 to the shopping cart ws_data_type=advanced
Delete an item with quantity 1 from the shopping cart ws_data_type=advanced
Calling the login page
Incorrect login of a legacy customer, UserID or password incorrect
Incorrect registration of a new customer, UserID already exists
Order confirmation with 1 item without different shipping address and without customer number ws_data_type=advanced
Order confirmation with 2 items with different shipping address and with customer number ws_data_type=advanced
The customer number is 32 characters long and is formed from a 16Byte MD5 hash.