The s.events variable is used to record common shopping cart success events as well as custom success events.
|Max Size||Debugger Parameter||Reports Populated||Default Value|
Shopping Cart Events
An event should be considered a milestone within a site. Success events are most commonly populated on the final confirmation page of a process, such as a registration process or newsletter sign-up. Custom events are defined by populating the events variable with the literal values defined in the Possible Values section below.
By default, success events are configured as counter events. Counter events count the number of times a success event is set (x+1). Events can also be configured as numeric events. Numeric events allow you to specify the number to increment (as might be necessary when counting dynamic or arbitrary values, such as the number of results returned by an internal search).
A final event type, currency, allows you to define the amount to be added (similar to numeric events), but displays as currency in reports, and is subject to currency conversions based on the s.currencyCode value and the default currency setting for your report suite. For additional information on using numeric and currency events, see Products.
The s.events variable is enabled by default for all implementations. The seven pre-configured conversion events are automatically enabled for all new report suites. New custom events (event1-event100 or event1000) can be enabled by any admin-level user using the Admin Console.
The following is a list of possible values for the events variable:
|scOpen||Open / Initialize a new shopping cart||Carts|
|scAdd||Add item(s) to the shopping cart||Cart Additions|
|scRemove||Remove item(s) from the shopping cart||Cart Removals|
|scView||View shopping cart||Cart Views|
|scCheckout||Beginning of the checkout process||Checkouts|
|purchase||Completion of a purchase (order)||Orders|
|event1 - event1000 (event100 for point product)||Custom events||Custom Events|
Counter events are set by placing the desired events in the s.events variable, in a comma-separated list (if multiple events are to be passed).
If on H23 code or higher, counter events can have integers greater than one assigned to them.
Implementing counter events with assigned integer values treat the event as if it fired multiple times within the image request. Counter events do not allow decimals- it is recommended to use numeric events instead if this functionality is required.
Numeric and currency events must be included in the s.events variable, though they typically receive their numerical value (e.g., 24.99) in the s.products variable. This allows you to tie specific numeric and currency values to individual product entries.
s.events="event1" s.products="Footwear;Running Shoes;1;99.99;event1=4.50"
s.events="event1,event4" s.products="Footwear;Running Shoes;1;99.99;event1=4.50|event4=1.99"
You can also track these types of events by leaving the product and category fields blank. This was the process to measure data such as tax and shipping before support was added for decimal values outside of the products string. If you want to pass a numeric or currency value but do not want to tie these to an individual product (such as a discount applied to an entire order, or a value captured outside of the product view or shopping cart process), this can be done by using s.products as shown below, but leaving the product and category fields blank.
Numeric/Currency Events that are given a value directly in events list apply to all products in the products list.
This is useful to track order-wide discounts, shipping, and similar values, without modifying the product price or by tracking it in the product list separately. For example, if you configured event10 to contain order-wide discounts, a purchase with a 10% discount might appear similar to the following:
s.events="purchase,event10=9.95" s.products="Footwear;Running Shoes;1;69.95,Running Essentials;Socks;10;29.50"
On Numeric/Currency Event reports, the report total represents the de-duplicated event total (in this example, the total amount of discounts during the reporting period), not the sum of the event values for each product.
Counter events can be passed along with numeric/currency events by passing all desired events in the s.events variable, and then passing only the numeric/currency events in the s.products variable.
By default, an event is counted every time the event is set on your site.
See Event Serialization for more information.