Analytics Reporting URL Patterns

Each analytics event corresponds to a specific URL pattern. The pattern begins with a call to the ReportingEvent-Start endpoint, followed by a collection of URL parameters that are specific to 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.

ABTest URL Pattern

The ABTest event isn't used in either SFRA or SGJC. However, SGJC does provide a template (ReportABTesting.isml) that you can use to record this event.

URL Parameter Parameter Value
ID The string "ABTest."
Name A name for the entire test (for example, "FastCheckout").
Segment A basket was 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
)}"/>

AccountOpen URL Pattern

The AccountOpen event is used in both SFRA and SGJC.

URL Parameter Parameter Value
ID The string "AccountOpen."
TotalUserCount The number of 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)
)}"/>

BasketOpen URL Pattern

The BasketOpen event is used in both SFRA and SGJC.

URL Parameter Parameter Value
ID The string "BasketOpen."
BasketID The basket's UUID.
Items The number of product line items in the basket.
MerchandizeTotal The merchandize total price.
AdjMerchandizeTotal The adjusted merchandize total price including product-level adjustments.
AdjMerchandizeTotalPromo The adjusted merchandize total price including both product-level and order-level adjustments.
ShippingTotal The shipping total price.
AdjShippingTotal The 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)
)}"/>

Checkout URL Pattern

The Checkout event is used in both SFRA and SGJC.

URL Parameter Parameter Value
ID The string "Checkout."
BasketID The basket's UUID.
Step The number of the checkout step.
Name The 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>

GCPurchased URL Pattern

The GCPurchased event is used only in SGJC.

URL Parameter Parameter Value
ID The string "GCPurchased."
Amount The base price for the line item, which is the price of the unit before applying 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>

GCRedeemed URL Pattern

The GCPurchased event is used only in SGJC.

URL Parameter Parameter Value
ID The string "GCRedeemed."
Amount The amount of money redeemed for the 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>

Item URL Pattern

The Item event is used in both SFRA and SGJC.

URL Parameter Parameter Value
ID The string "Checkout."
SKU The line item's product ID.
Name The line item's product name.
UUID The line item's UUID.
Quantity The line item's quantity.
CurrencyCode The currency code of the order.
Base The line item's base price.
Net The line item's net price.
Tax The line item's tax amount.
Gross The line item's gross price.
AdjNet The net price of the product line item after applying all product-level adjustments.
AdjTax The tax of the line item after applying adjustments, in the purchase currency.
AdjGross The gross price of the line item after applying all product-level adjustments.
Mfg The name of the manufacturer of the product.
Bonus Boolean indicating if the product line item represents a bonus line item.

For SFRA, see the helper method getOrderReportingURLs() in 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
		)}"/>

ItemPromo URL Pattern

The ItemPromo event is used in both SFRA and SGJC.

URL Parameter Parameter Value
ID The string "Checkout."
ItemUUID The line item's product ID.
campID The line item's product name.
promoID The line item's UUID.
value The line item's quantity.
campaign The currency code of the order.
coupon The line item's base price.

For SFRA, see the helper method getItemPromoReportingURLs() in 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>

LastReceivedSourceCode URL Pattern

The LastRecievedSourceCode event is used only in SGJC.

URL Parameter Parameter Value
ID The string "LastReceivedSourceCode."
Code The literal source code.
Group The source code group associated with the source code.
Status The 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)}"/>

Order URL Pattern

The Order event is used in both SFRA and SGJC.

URL Parameter Parameter Value
ID The string "Order."
CurrencyCode The currency code of the order.
CreationDate The date and time the order was created.
CreatedBy The name of the shopper who created the order.
MerchandizeTotalNet The total net price (excluding tax) in purchase currency.
MerchandizeTotalTax The total tax in purchase currency.
MerchandizeTotalGross The total gross price (including tax) in purchase currency.
ShippingNet The sum of all shipping line items of the line item container, excluding tax before shipping adjustments have been applied.
ShippingTax The tax of all shipping line items of the line item container before shipping adjustments have been applied.
ShippingGross The sum of all shipping line items of the line item container, including tax before shipping adjustments have been applied.
AdjMerchandizeTotalNet The sum of all shipping line items of the line item container, excluding tax after shipping adjustments have been applied.
AdjMerchandizeTotalTax The subtotal tax in purchase currency. Adjusted merchandise prices represent the sum of product prices before services such as shipping have been added, but after adjustment from promotions have been added.
AdjMerchandizeTotalGross The adjusted total gross price (including tax) in purchase currency. Adjusted merchandise prices represent the sum of product prices before services such as shipping, but after product-level and order-level adjustments.
AdjShippingNet The sum of all shipping line items of the line item container, excluding tax after shipping adjustments have been applied.
AdjShippingTax The tax of all shipping line items of the line item container after shipping adjustments have been applied.
AdjShippingGross The adjusted sum of all shipping line items of the line item container, including tax after shipping adjustments have been applied.
Net The grand total price for LineItemCtnr net of tax, in purchase currency. Total prices represent the sum of product prices, services prices and adjustments.
Tax The grand total tax for LineItemCtnr, in purchase currency. Total prices represent the sum of product prices, services prices and adjustments.
Gross The grand total price gross of tax for LineItemCtnr, in purchase currency. Total prices represent the sum of product prices, services prices and adjustments.

For SFRA, see the helper method getOrderReportingURLs() 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',		'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)
	)}"/>

OrderPromo URL Pattern

The OrderPromo event is used in both SFRA and SGJC.

URL Parameter Parameter Value
ID The string "OrderPromo."
campID The campaign ID associated with the price adjustment.
promoID The promotion ID associated with the price adjustment.
value The value of the price adjustment.
campaign A boolean indicating if the price adjustment was created by custom script code.
coupon A boolean indicating if the price adjustment resulted from a coupon.

For SFRA, see the helper method getOrderPromoReportingURLs() 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',  'OrderPromo',
	'campID',  campaignID,
	'promoID',  priceAdjustment.promotionID,
	'value',  StringUtils.formatNumber(
		priceAdjustment.price.value, '#,##0.00', locale),
	'campaign',  !priceAdjustment.isCustom(),
	'coupon',  priceAdjustment.basedOnCoupon
	)}"/>

ProductSearch URL Pattern

The ProductSearch event is used in both SFRA and SGJC.

URL Parameter Parameter Value
ID The string "ProductSearch."
Phrase The unrefined product search phrase.
ResultCount The number of hits in the search results.

For SFRA, see the helper method getProductSearchReportingURLs() in 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)
	)}"/>

ShippingPromo URL Pattern

The ShippingPromo event is used in both SFRA and SGJC.

URL Parameter Parameter Value
ID The string "ShippingPromo."
campID The campaign ID associated with the price adjustment.
promoID The promotion ID associated with the price adjustment.
value The value of the price adjustment.
campaign A boolean indicating if the price adjustment was created by custom script code.
coupon A boolean indicating if the 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
	)}"/>

SourceCode URL Pattern

The LastRecievedSourceCode event is used only in SGJC.

URL Parameter Parameter Value
ID The string "SourceCode."
Code The literal source code.
Group The source code group associated with the source code.
Status The 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
	)}"/>

UserOrders URL Pattern

The UserOrders event is used in both SFRA and SGJC.

URL Parameter Parameter Value
ID The string "UserOrders."
Count The number of orders placed by the shopper.

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')
	)}"/>

Related Links

Analytics

Analytics Metrics Definitions

Analytics Reporting Integration

Analytics Reporting Integration Events

Analytics Reporting Integration in SFRA

Analytics Reporting Integration in SGJC