---
schema_version: "1"
id: c1089ff8013143153438325d0789dc89b99890226c377497143cf1f9e9914bdd
title: Analytics Reporting Integration in Salesforce Reference Architecture (SFRA)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_analytics_reporting_integration_sfra.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_analytics_reporting_integration_sfra.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 25788b211672b210703e8dabe2fbd6e08ae2992b73bb396857fd4080e0928cc9
description: To record Analytics events in B2C Commerce SFRA, you construct the corresponding URL patterns by calling helper methods in the reportingUrls.js module. Each of these helper methods constructs URLs and returns an array of URLs. This array is then passed as a variable (pdict.reportingURLs) to the template reportingUrls.isml.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Analytics Reporting Integration in Salesforce Reference Architecture (SFRA)

To record Analytics events in B2C Commerce SFRA, you construct the corresponding URL patterns by calling helper methods in the `reportingUrls.js` module. Each of these helper methods constructs URLs and returns an array of URLs. This array is then passed as a variable (`pdict.reportingURLs`) to the template `reportingUrls.isml`.

## SFRA Analytics Reporting Helper Script

The `app_storefront_base/cartridge/scripts/reportingUrls.js` script provides the following helper method:

```
getCheckoutReportingURLs(UUID, step, stepName)               // Checkout event
```

## SFRA Analytics Reporting Template

The following code snippet shows the body of the `app_storefront_base/cartridge/templates/default/reporting/reportingUrls.isml` template:

```

<isloop items="${pdict.reportingURLs}" var="URL">
	<isinclude url="${URL}" />
</isloop>
```

For any SFRA template to record Analytics events, include this template. For example, here is a code snippet taken from the `app_storefront_base/cartridge/templates/default/checkout/confirmation/confirmation.isml` template:

```

<isif condition="${pdict.reportingURLs && pdict.reportingURLs.length}">
	<isinclude template="reporting/reportingUrls" />
</isif>
```