Each Analytics event corresponds to a URL pattern. The pattern begins with a call to the ReportingEvent-Start endpoint, followed by a collection of URL parameters for each event. The SFRA and SGJC reference applications use different techniques to construct the URLs.
The following sections describe the URL patterns for each Analytics event and provide information about where you view implementation details.
Neither SFRA nor SGJC use
the ABTest
event. However, SGJC does provide a
template (ReportABTesting.isml
) that you can use to
record this event.
URL Parameter | Parameter Value |
---|---|
ID
|
"ABTest" string |
Name
|
Test name, for example, "FastCheckout" |
Segment
|
Basket created or opened |
For SGJC, the following code snippet from the
ReportingABTesting.isml
template shows how this URL
pattern is constructed:
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'ABTest',
'Name', pdict.TestName,
'Segment', pdict.BranchName
)}"/>
SFRA and SGJC use the
AccountOpen
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"AccountOpen" string |
TotalUserCount
|
Registered customers in the system |
For SFRA, see the helper method
getAccountOpenReportingURLs()
in
reportingUrls.js
.
For SGJC, the following snippet
shows how this URL pattern is constructed in the
ReportUserRegistration.isml
template:
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'AccountOpen',
'TotalUserCount', StringUtils.formatNumber(dw.customer.CustomerMgr.registeredCustomerCount, '#,##0', locale)
)}"/>
SFRA and SGJC use the
BasketOpen
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"BasketOpen" string |
BasketID
|
Basket UUID |
Items
|
Total product line items in the basket |
MerchandizeTotal
|
Total merchandise price |
AdjMerchandizeTotal
|
Adjusted merchandise total price including product-level adjustments |
AdjMerchandizeTotalPromo
|
Adjusted merchandise total price including product-level and order-level adjustments |
ShippingTotal
|
Shipping total price |
AdjShippingTotal
|
Adjusted shipping total price |
For SFRA, see the helper method
getBasketOpenReportingURLs()
in
reportingUrls.js
.
For SGJC, the following snippet
shows how this URL pattern is constructed in the
ReportUserRegistration.isml
template:
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'BasketOpen',
'BasketID', pdict.Basket.UUID,
'Items', StringUtils.formatNumber(
pdict.Basket.productLineItems.length, '#,##0', locale),
'MerchandizeTotal', StringUtils.formatNumber(
pdict.Basket.merchandizeTotalPrice.value, '#,##0.00', locale),
'AdjMerchandizeTotal', StringUtils.formatNumber(
pdict.Basket.getAdjustedMerchandizeTotalPrice(false).value, '#,##0.00', locale),
'AdjMerchandizeTotalPromo', StringUtils.formatNumber(
pdict.Basket.getAdjustedMerchandizeTotalPrice(true).value, '#,##0.00', locale),
'ShippingTotal', StringUtils.formatNumber(
pdict.Basket.shippingTotalPrice.value, '#,##0.00', locale),
'AdjShippingTotal', StringUtils.formatNumber(
pdict.Basket.adjustedShippingTotalPrice.value, '#,##0.00', locale)
)}"/>
SFRA and SGJC use the
Checkout
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"Checkout" string |
BasketID
|
Basket UUID |
Step
|
Checkout step number |
Name
|
Checkout name |
For SFRA, see the helper method
getCheckoutReportingURLs()
in
reportingUrls.js
.
For SGJC, the following snippet
shows how this URL pattern is constructed in the
ReportCheckout.isml
template:
<isif condition="${empty(checkoutstep)}">
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'Checkout',
'BasketID', pdict.Basket.UUID,
'Step', StringUtils.formatNumber(1, '#,##0', locale),
'Name', checkoutname
)}"/>
<iselse/>
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'Checkout',
'BasketID', pdict.Basket.UUID,
'Step', StringUtils.formatNumber(checkoutstep, '#,##0', locale),
'Name', checkoutname
)}"/>
</isif>
Only SGJC uses the GCPurchased event.
URL Parameter | Parameter Value |
---|---|
ID
|
"GCPurchased" string |
Amount
|
Line item base price, which is the unit price before adjustments, in the purchase currency |
For SGJC, the following snippet shows how this URL pattern is
constructed in the ReportOrder.isml
template:
<isloop items="${pdict.Order.giftCertificateLineItems}" var="GCLI">
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'GCPurchased',
'Amount', StringUtils.formatNumber(GCLI.basePrice.value, '#,##0.00', locale)
)}"/>
</isloop>
Only SGJC uses the GCPurchased event.
URL Parameter | Parameter Value |
---|---|
ID
|
"GCRedeemed" string |
Amount
|
Money redeemed for payment instrument |
For SGJC, the following snippet shows how this URL pattern is
constructed in the ReportOrder.isml
template:
<isloop items="${pdict.Order.giftCertificatePaymentInstruments}" var="GCPI">
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'GCRedeemed',
'Amount', StringUtils.formatNumber(GCPI.paymentTransaction.amount.value, '#,##0.00', locale)
)}"/>
</isloop>
SFRA and SGJC use the Item
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"Checkout" string |
SKU
|
Line item product ID |
Name
|
Line item product name |
UUID
|
Line item UUID |
Quantity
|
Line item quantity |
CurrencyCode
|
Order currency code |
Base
|
Line item base price |
Net
|
Line item net price |
Tax
|
Line item tax amount |
Gross
|
Line item gross price |
AdjNet
|
Product line item net price after applying all product-level adjustments |
AdjTax
|
Line item tax after applying adjustments, in the purchase currency |
AdjGross
|
Line item gross price after applying all product-level adjustments |
Mfg
|
Product manufacturer name |
Bonus
|
Boolean indicating if product line item represents a bonus line item |
For SFRA, see the helper method
in
getOrderReportingURLs()
reportingUrls.js
.
For SGJC, the following snippet
shows how this URL pattern is constructed in the
ReportOrder.isml
template:
<isloop items="${shipment.productLineItems}" var="PLI">
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'Item',
'SKU', PLI.productID,
'Name', PLI.productName,
'UUID', PLI.UUID,
'Quantity', StringUtils.formatNumber(PLI.quantity.value, '#,##0.00', locale),
'CurrencyCode', pdict.Order.currencyCode,
'Base', StringUtils.formatNumber(PLI.basePrice.value, '#,##0.00', locale),
'Net', StringUtils.formatNumber(PLI.netPrice.value, '#,##0.00', locale),
'Tax', StringUtils.formatNumber(PLI.tax.value, '#,##0.00', locale),
'Gross', StringUtils.formatNumber(PLI.grossPrice.value, '#,##0.00', locale),
'AdjNet', StringUtils.formatNumber(PLI.adjustedNetPrice.value, '#,##0.00', locale),
'AdjTax', StringUtils.formatNumber(PLI.adjustedTax.value, '#,##0.00', locale),
'AdjGross', StringUtils.formatNumber(PLI.adjustedGrossPrice.value, '#,##0.00', locale),
'Mfg', PLI.manufacturerName,
'Bonus', PLI.bonusProductLineItem
)}"/>
SFRA and SGJC use the
ItemPromo
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"Checkout" string |
ItemUUID
|
Line item product ID |
campID
|
Line item product name |
promoID
|
Line item UUID |
value
|
Line item quantity |
campaign
|
Order currency code |
coupon
|
Line item base price |
For SFRA, see the helper method
in
getItemPromoReportingURLs()
reportingUrls.js
.
For SGJC, the following snippet
shows how this URL pattern is constructed in the
ReportOrder.isml
template:
<isloop items="${PLI.priceAdjustments}" var="priceAdjustment">
<iscomment>Get Campaign ID</iscomment>
<isscript>
var campaignID : String = "N/A";
if ( priceAdjustment.campaignID != null )
{
campaignID = priceAdjustment.campaignID;
}
</isscript>
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'ItemPromo',
'ItemUUID', PLI.UUID,
'campID', campaignID,
'promoID', priceAdjustment.promotionID,
'value', StringUtils.formatNumber(priceAdjustment.price.value, '#,##0.00', locale),
'campaign', !priceAdjustment.isCustom(),
'coupon', priceAdjustment.basedOnCoupon
)}"/>
</isloop>
Only SGJC uses the LastRecievedSourceCode event.
URL Parameter | Parameter Value |
---|---|
ID
|
"LastReceivedSourceCode" string |
Code
|
Literal source code |
Group
|
Source code group associated with source code |
Status
|
Source code status: Active (2), Inactive(1), or Invalid(0) |
For SGJC, the following snippet shows how this URL pattern is
constructed in the ReportSourceCodes.isml
template:
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'LastReceivedSourceCode',
'Code', session.lastReceivedSourceCodeInfo.code,
'Group', sourceCodeGroupID,
'Status', sourceCodeState)}"/>
SFRA and SGJC use the Order
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"Order" string |
CurrencyCode
|
Order currency code |
CreationDate
|
Order creation date and time |
CreatedBy
|
Shopper name |
MerchandizeTotalNet
|
Total net price excluding tax in purchase currency |
MerchandizeTotalTax
|
Total tax in purchase currency |
MerchandizeTotalGross
|
Total gross price including tax in purchase currency |
ShippingNet
|
Shipping line items sum, excluding tax before shipping adjustments |
ShippingTax
|
Shipping line items tax before shipping adjustments |
ShippingGross
|
Shipping line items sum including tax before shipping adjustments |
AdjMerchandizeTotalNet
|
Shipping line items sum excluding tax after shipping adjustments |
AdjMerchandizeTotalTax
|
Subtotal tax in purchase currency. Adjusted merchandise price is the sum of product prices before added services such as shipping, but after promotion adjustments |
AdjMerchandizeTotalGross
|
Adjusted total gross price including tax in purchase currency. Adjusted merchandise price is the sum of product prices before services such as shipping, but after product-level and order-level adjustments |
AdjShippingNet
|
Shipping line item sum excluding tax after shipping adjustments |
AdjShippingTax
|
Tax of all shipping line items of the line item container after shipping adjustments |
AdjShippingGross
|
Shipping line items sum including tax after shipping adjustments |
Net
|
Total price for LineItemCtnr net of tax, in purchase currency. Total price is the sum of product prices, services prices, and adjustments |
Tax
|
Total tax for LineItemCtnr, in purchase currency. Total price is the sum of product prices, services prices, and adjustments |
Gross | Total price gross of tax for LineItemCtnr, in purchase currency. Total price is the sum of product prices, services prices, and adjustments |
For SFRA, see the helper method
in
getOrderReportingURLs()
reportingUrls.js
.
For SGJC, the following snippet
shows how this URL pattern is constructed in the
ReportOrder.isml
template:
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'Order',
'CurrencyCode', pdict.Order.currencyCode,
'CreationDate', StringUtils.formatCalendar(
new dw.util.Calendar(pdict.Order.creationDate), 'yyyyMMdd\'T\'HH:mm:ss.SSSZ'),
'CreatedBy', pdict.Order.createdBy,
'MerchandizeTotalNet', StringUtils.formatNumber(
pdict.Order.merchandizeTotalNetPrice.value, '#,##0.00', locale),
'MerchandizeTotalTax', StringUtils.formatNumber(
pdict.Order.merchandizeTotalTax.value, '#,##0.00', locale),
'MerchandizeTotalGross', StringUtils.formatNumber(
pdict.Order.merchandizeTotalGrossPrice.value, '#,##0.00', locale),
'ShippingNet', StringUtils.formatNumber(
pdict.Order.shippingTotalNetPrice.value, '#,##0.00', locale),
'ShippingTax', StringUtils.formatNumber(
pdict.Order.shippingTotalTax.value, '#,##0.00', locale),
'ShippingGross', StringUtils.formatNumber(
pdict.Order.shippingTotalGrossPrice.value, '#,##0.00', locale),
'AdjMerchandizeTotalNet', StringUtils.formatNumber(
pdict.Order.adjustedMerchandizeTotalNetPrice.value, '#,##0.00', locale),
'AdjMerchandizeTotalTax', StringUtils.formatNumber(
pdict.Order.adjustedMerchandizeTotalTax.value, '#,##0.00', locale),
'AdjMerchandizeTotalGross', StringUtils.formatNumber(
pdict.Order.adjustedMerchandizeTotalGrossPrice.value, '#,##0.00', locale),
'AdjShippingNet', StringUtils.formatNumber(
pdict.Order.adjustedShippingTotalNetPrice.value, '#,##0.00', locale),
'AdjShippingTax', StringUtils.formatNumber(
pdict.Order.adjustedShippingTotalTax.value, '#,##0.00', locale),
'AdjShippingGross', StringUtils.formatNumber(
pdict.Order.adjustedShippingTotalGrossPrice.value, '#,##0.00', locale),
'Net', StringUtils.formatNumber(
pdict.Order.totalNetPrice.value, '#,##0.00', locale),
'Tax', StringUtils.formatNumber(
pdict.Order.totalTax.value, '#,##0.00', locale),
'Gross', StringUtils.formatNumber(
pdict.Order.totalGrossPrice.value, '#,##0.00', locale)
)}"/>
SFRA and SGJC use the
OrderPromo
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"OrderPromo" string |
campID
|
Campaign ID associated with the price adjustment |
promoID
|
Promotion ID associated with the price adjustment |
value
|
Value of the price adjustment |
campaign
|
Boolean indicating if custom script code created price adjustment |
coupon
|
Boolean indicating if price adjustment resulted from a coupon |
For SFRA, see the helper method
in
getOrderPromoReportingURLs()
reportingUrls.js
.
For SGJC, the following snippet
shows how this URL pattern is constructed in the
ReportOrder.isml
template:
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'OrderPromo',
'campID', campaignID,
'promoID', priceAdjustment.promotionID,
'value', StringUtils.formatNumber(
priceAdjustment.price.value, '#,##0.00', locale),
'campaign', !priceAdjustment.isCustom(),
'coupon', priceAdjustment.basedOnCoupon
)}"/>
SFRA and SGJC use the
ProductSearch
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"ProductSearch" string |
Phrase
|
Unrefined product search phrase |
ResultCount
|
Total search result hits |
For SFRA, see the helper method
in
getProductSearchReportingURLs()
reportingUrls.js
.
For SGJC, the following snippet
shows how this URL pattern is constructed in the
ReportSearch.isml
template:
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'ProductSearch',
'Phrase', pdict.ProductSearchResult.searchPhrase,
'ResultCount', StringUtils.formatNumber(
pdict.ProductSearchResult.count, '#,##0', locale)
)}"/>
SFRA and SGCJ both use the
ShippingPromo
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"ShippingPromo" string |
campID
|
Campaign ID associated with the price adjustment |
promoID
|
Promotion ID associated with the price adjustment |
value
|
Value of the price adjustment |
campaign
|
Boolean indicating if custom script code created price adjustment |
coupon
|
Boolean indicating if price adjustment resulted from a coupon |
For SFRA, see the helper method
getShippingPromoReportingURLs
in
()
reportingUrls.js
.
For SGJC, the following
snippet shows how this URL pattern is constructed in the
ReportOrder.isml
and ReportShipping.isml
templates:
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'ShippingPromo',
'campID', campaignID,
'promoID', shippingAdjustment.promotionID,
'value', StringUtils.formatNumber(
shippingAdjustment.price.value, '#,##0.00', locale),
'campaign' !shippingAdjustment.isCustom(),
'coupon', shippingAdjustment.basedOnCoupon
)}"/>
Only SGJC uses the
LastRecievedSourceCode
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"SourceCode" string |
Code
|
Literal source code |
Group
|
Source code group associated with source code |
Status
|
Source code status: Active(2), Inactive(1), or Invalid(0) |
For SGJC, the following snippet shows how this URL pattern is
constructed in the ReportSourceCodes.isml
template:
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'SourceCode',
'Code', session.sourceCodeInfo.code,
'Group', sourceCodeGroupID,
'Status', sourceCodeState
)}"/>
SFRA and SGJC use the
UserOrders
event.
URL Parameter | Parameter Value |
---|---|
ID
|
"UserOrders" string |
Count
|
Shopper orders |
For SFRA, see the helper method
getOrderPlacedReportingURLs
in
()
reportingUrls.js
.
For SGJC, the following
snippet shows how this URL pattern is constructed in the
ReportOrder.isml
template:
<isinclude url="${URLUtils.url('ReportingEvent-Start',
'ID', 'UserOrders',
'Count', StringUtils.formatNumber(pdict.CurrentCustomer.orderHistory.orderCount, '#,##0')
)}"/>