Analytics variables are used to capture specific
purchase information. The
s.purchaseID variable is used to serialize
(de-duplicate) the event.
purchaseID is limited to 20 characters. The
purchaseID variable serializes all events passed in
s.events, and overrides any serialization value for
purchaseID is left blank, each instance of the
purchase event, even page reloads, is counted.
If a purchase event is called without a
purchaseID, a unique one is automatically generated
based on the
s.events variables. This automatically generated
purchaseID is stored locally as a cookie value within
the visitor's browser, and is not sent to any report suite tables. Manually
purchaseIDs on the other hand are sent to a back-end
table within the report suite. The last five purchases made by a visitor (with
purchaseID) are stored in the local cookie.
When a visitor makes any purchase, the following checks are made:
- Does the
purchaseID match any of the five cookie values? If
so, the image request is considered a duplicate purchase. All conversion
variables, including the purchase event, do not appear in reporting.
purchaseID is defined, does it match any value in
the report suite's back-end table? If so, the image request is considered a
duplicate purchase. All conversion variables, including the purchase event, do
not appear in reporting.
- If the
purchaseID is unique to both the last 5 stored
values in the cookie and the report suite's
purchaseID table, the image request is unique and
included in reporting. For example, if five purchases are already included in
the local cookie, the oldest one is overwritten.
Specific server-side code can be used to generate the unique number
(alphanumeric value) embedded in the HTML source. Usually the Order ID, or
similar alphanumeric value, is used for this purpose. This value should not
change if the user refreshes the page. The following is a short example (note
purchaseID code in bold):
s.products="Footwear;Hiking Boots (1234);1;170.00"
- Be sure to use
server-side code to generate the unique identifier for the event. Do not use a
numbers each time the page is loaded (each
- The unique identifiers
are applicable to all users across all sessions. Therefore, ensure the
identifier is unique across users and sessions. For instance, if the Order ID
repeats after 30 days, append the date of the order to make the
Order ID sufficiently unique.
- The serialization value
may be alphanumeric values up to 20 characters in length. This is identical to
the limitations of
s.purchaseID (replace s. with s_ for G Code).
s.purchaseID variable serializes all events
passed in the variable
s.events, and overrides any serialization value
for events. Do not use
Event serialization for any events if the
s.purchaseID variable is used on the current
page (replace s. with s_ for G Code).