Analytics Reporting URL Patterns

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.

ABTest URL Pattern

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

Checkout URL Pattern

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>