Overview
The E-commerce log formats (ELF & ELF2) were designed to record information about customer transactions from online shopping sites. ELF was originally created for use with Urchin 3 and may be used with Urchin 5 when processing data with the IP-Only visitor method. ELF2 is similar to ELF and includes additional fields that allow for visitor correlation using the IP+UserAgent, UTM, and other visitor tracking methods. It is recommended to log data in the ELF2 format since it is able to provide better visitor correlation with your webserver data. If you cannot set up your shopping cart software to log in ELF/ELF2, then you must configure your own Urchin custom log format prior to attempting to process your e-commerce data.
This document describes the format of the ELF and ELF2 log files that are created by the shopping cart software and explains how to configure Urchin for processing of e- commerce logs.
Configuring Urchin for ELF/ELF2 Log Files
You must select specific Urchin configuration parameters depending on your e-commerce log type.
ELF processing
- In the Log Source->Log Settings screen set the Log Format to either elf or auto
- In the Profile->Reporting screen set the Visitor Tracking Method in the Profile to IP-ONLY, which is the only method supported when using ELF e-commerce log formats
ELF2 processing
- In the Log Source->Log Settings screen set the Log Format to either elf2 or auto
- In the Profile->Reporting screen set the Visitor Tracking Method to any of the choices, which are all supported when using ELF2
Your e-commerce log should be listed as a second log source along with your main website log in the profile that is created to handle your e-commerce reporting. The logs are processed sequentially by Urchin.
ELF/ELF2 Log Format Description
Both ELF and ELF2 are tab-separated multi-line log formats. The first line begins with an '!' exclamation character and contains overall information about the purchase. Subsequent lines contain detailed information about the items purchased. The first line is referred to as the transaction and the subsequent lines are referred to as items. Blank fields should contain a '-' character. Since tabs are used to separate fields, the tab character is not allowed to be used within a field.
A typical ELF/ELF2 log file will have the following general form:
!transation1
item1
item2
item3
!transaction_2
item1
item2
...
ELF2 Log Format
ELF2 Transaction Line
The ELF2 transaction line begins with an '!' exclamation and contains the following tab separated fields (empty fields should contain a '-' character):
!%{ORDERID} %{REMOTE_HOST} %{DATE/TIME} %{STORE}
%{SESSIONID} %{TOTAL} %{TAX}
%{SHIPPING}
%{BILL_CITY} %{BILL_STATE} %{BILL_ZIP} %{BILL_COUNTRY}
%{USER_AGENT} %{COOKIES}
where:
- %{ORDERID} is the order number
- %{REMOTE_HOST} is the hostname/ip address of the remote machine
- %{DATE/TIME} is the time in the common log format [dd/mmm/yyyy:HH:MM:SS +/-ZZZZ]
- %{STORE} is the name/id of the storefront
- %{SESSIONID} is the unique session identifier of the customer
- %{TOTAL} is the transaction total including tax and shipping (decimal only, no '$' characters)
- %{TAX} is the amount of tax charged to the subtotal
- %{SHIPPING} is the amount of shipping charges
- %{BILL_CITY} is the billing city of the customer
- %{BILL_STATE} is the billing state of the customer
- %{BILL_ZIP} is the billing zip code of the customer
- %{BILL_COUNTRY} is the billing country of the customer
- %{USER_AGENT} is the user agent of the customers browser
- %{COOKIES} are the incoming cookies contained in the headers from the customers browser
ELF2 Item Line
The ELF2 item line contains the following tab separated fields (empty fields should contain a '-' character):
%{ORDERID} %{REMOTE_HOST} %{DATE/TIME} %{PRODUCT_CODE}
%{PRODUCT_NAME} %{VARIATION}
%{PRICE} %{QUANTITY} %{UPSOLD} %{USER_AGENT} %{COOKIES}
where:
- %{ORDERID} is the order number
- %{REMOTE_HOST} is the hostname/ip address of the remote machine
- %{DATE/TIME} is the time in the common log format [dd/mm/yyyy:HH:MM:SS +/-ZZZZ]
- %{PRODUCT_CODE} is the identifier of the product
- %{PRODUCT_NAME} is the name of the product
- %{VARIATION} is an optional variation of the product for colors, sizes, etc
- %{PRICE} is the unit price of the product (decimal only, no '$' signs)
- %{QUANTITY} is the quantity ordered of this product
- %{UPSOLD} is a boolean (0|1) if the product was on sale
- %{USER_AGENT} is the user agent of the customers browser
- %{COOKIES} are the incoming cookies contained in the headers from the customers browser
ELF2 Log File Example
The following 2 lines demonstrate a transaction and corresponding item entry in an ELF2 log:
!36530 123.123.123.123 [21/Aug/2003:11:31:45 -0800] - - 895.00 - - Virginia Beach VA 23452 US "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" "__utma=171060324.2002410569.1061216915.1061216915.1061490246.2; __utmb=171060324;__utmc=171060324" 36530 123.123.123.123 [21/Aug/2003:11:31:45 -0800] U5-BASE Urchin 5 Base License - 895.00 1 - "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" "__utma=171060324.2002410569.1061216915.1061216915.1061490246.2; __utmb=171060324;__utmc=171060324"
ELF Log Format
ELF Transaction Line
The ELF transaction line begins with an '!' exclamation and contains the following tab separated fields (empty fields should contain a '-' character):
!%{ORDERID} %{REMOTE_HOST} %{STORE} %{SESSIONID} %{DATE/TIME} %{TOTAL} %{TAX} %{SHIPPING} %{BILL_CITY} %{BILL_STATE} %{BILL_ZIP} %{BILL_COUNTRY}
where:
- %{ORDERID} is the order number
- %{REMOTE_HOST} is the hostname/ip address of the remote machine
- %{STORE} is the name/id of the storefront
- %{SESSIONID} is the unique session identifier of the customer
- %{DATE/TIME} is the time in the common log format [dd/mmm/yyyy:HH:MM:SS +/-ZZZZ]
- %{TOTAL} is the transaction total including tax and shipping (decimal only, no '$' characters)
- %{TAX} is the amount of tax charged to the subtotal
- %{SHIPPING} is the amount of shipping charges
- %{BILL_CITY} is the billing city of the customer
- %{BILL_STATE} is the billing state of the customer
- %{BILL_ZIP} is the billing zip code of the customer
- %{BILL_COUNTRY} is the billing country of the customer
The ELF item line contains the following tab separated fields (empty fields should contain a '-' character):
%{ORDERID} %{PRODUCT_CODE} %{PRODUCT_NAME} %{VARIATION} %{PRICE} %{QUANTITY} %{UPSOLD}
where:
- %{ORDERID} is the order number
- %{PRODUCT_CODE} is the identifier of the product
- %{PRODUCT_NAME} is the name of the product
- %{VARIATION} is an optional variation of the product for colors, sizes, etc
- %{PRICE} is the unit price of the product (decimal only, no '$' signs)
- %{QUANTITY} is the quantity ordered of this product
- %{UPSOLD} is a boolean (0|1) if the product was on sale
The following lines demonstrate 2 transactions and corresponding item entries in an ELF log:
!12313 ppp-46.mia-tc-2.netrox.net ZongStore 1102323131 [27/Jul/1999:11:43:02 -0700] 198.12 8.12 10.00 Cedar Rapids Iowa 52403 US 12313 102 T Shirt XL 10.00 10 0 12313 103 Boxers L 9.00 10 0 !12314 213.12.54.123 - 110123413 [27/Jul/1999:11:43:02 -0700] 11.75 0.75 1.00 Santa Ana CA 92705 US 12314 102 T Shirt S 10.00 1 0