---
schema_version: "1"
id: 56d9bca40c4fab3050b8b261cecad135491a0081b4e4cf0b0e0c067ce83ed3f3
title: Analytics Reporting Integration in SGJC
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_sgjc.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_analytics_reporting_integration_sgjc.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6bf0e43172d576e1911eae85a1bdf36d3040ad609d2ab08dc5c1bd9f251c42aa
description: To record Analytics events in SGJC, add certain templates to your application. These templates call B2C Commerce processes that capture the data and report on it via the Business Manager user interface.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Analytics Reporting Integration in SGJC

To record Analytics events in SGJC, add certain templates to your application. These templates call B2C Commerce processes that capture the data and report on it via the Business Manager user interface.

SGJC uses session IDs to capture web activities for the Analytics data. This approach doesn't distinguish between visits and visitors (unique visits). However, this approach does circumvent the issue with users blocking cookies or not allowing JavaScript and therefore not being counted.

To capture this information, include the appropriate reporting template on a page. This template triggers a request to the server (via a URL include statement) with the required parameters.

When you include the reporting template, it triggers a request to the server. A URL include statement triggers the server request and provides the required parameters.

There are two ways of reporting events to Reports & Dashboards. Depending on the event, you use either the `ReportingEvent-Start` pipeline or the `isobject` tag.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note B2C Commerce ignores reporting (log) entries that originate from pages that are processed using the RedirectURL-Start pipeline (URL mappings).

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_important.png)

Important Don't use the `ReportingEvent-Start` pipeline as a pipeline trigger. There are some explicit checks for it in the web adapter, and the requests for that pipeline don't propagate to B2C Commerce. See [A/B Test Participation Triggers](https://help.salesforce.com/s/articleView?id=cc.b2c_ab_test_participation_triggers.htm&release=264.0.0&type=5 "With A/B testing, you can define triggers that a customer accesses to qualify for participation in a particular test. A/B test triggers are included in imported and exported data.").

See [Analytics.](https://help.salesforce.com/s/articleView?id=cc.b2c_analytics.htm&release=264.0.0&type=5 "The B2C Commerce Reports & Dashboards app gathers, analyzes, and synthesizes data from your realm, and configures it into logical datasets called dashboards. Use the Reports & Dashboards portal, to review your site's sales, product, promotion, technical, traffic, and other data. Each dashboard presents analytics that help you identify trends over time.")

## Reporting Hooks

The following SiteGenesis templates include reporting hooks (SiteGenesis Storefront Core: `cartridge/templates/default/util/reporting`):

- `ReportABTesting.isml`: collects Analytics on A/B testing (the A/B testing functionality in the Business Manager Analytics Module, not in the Online Marketing > A/B Testing module).
- `ReportCheckout.isml`: collects Analytics on the checkout process.

![Warning](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_warning.png)

Warning Don't change the locale in these templates. These templates merely log the information into the Analytics log file. The customer never sees it, and the Analytics module expects _en\_US._

## ReportABTesting.isml

Reference this template via an include statement in a template that renders the result of the test segmentation or alternate page. For example:

```
<isinclude template="util/reporting/ReportABTesting.isml"/>.
```

Variables are passed in the SiteGensis application to the `ReportingEvent-Start.xml` pipeline that this template expects

## ReportCheckout.isml

This template logs a checkout event. It logs the step, depending on the parameters, and expects the step number and name as parameters in the scope of a page. The reporting funnel display uses the step value to show the steps in ascending order. Using the name improves the display. This template can be called using an include statement, for example:

```
<isinclude template="util/reporting/ReportCheckout.isml"/> 
```

Use the parameters in this template to collect checkout information.

You can give each step a meaningful name for the checkout funnel name by changing the pdict variable `checkoutname`. Report the steps in the correct sequence with the `checkoutstep` variable. For example, if you have three steps in your checkout, they must be reported with the values one, two, and three. If you report with values one, two, and five, the funnel report inserts steps three and four with the same values as in step five.

In SiteGenesis, the `modues.isml` template references the `ReportCheckout.isml` template directly. It doesn't use an include statement.

## Related Links

[Analytics](https://help.salesforce.com/s/articleView?id=cc.b2c_analytics.htm&release=264.0.0&type=5 "The B2C Commerce Reports & Dashboards app gathers, analyzes, and synthesizes data from your realm, and configures it into logical datasets called dashboards. Use the Reports & Dashboards portal, to review your site's sales, product, promotion, technical, traffic, and other data. Each dashboard presents analytics that help you identify trends over time.")

[Analytics Reporting Integration](https://help.salesforce.com/s/articleView?id=cc.b2c_analytics_reporting_integration.htm&release=264.0.0&type=5 "Salesforce B2C Commerce provides robust storefront Analytics that can help make your storefront more successful.")

[Analytics Reporting Integration Events](https://help.salesforce.com/s/articleView?id=cc.b2c_analytics_reporting_integration_events.htm&release=264.0.0&type=5 "Salesforce B2C Commerce supports 2 Analytics reporting events.")

[Analytics Reporting Integration URL Patterns](https://help.salesforce.com/s/articleView?id=cc.b2c_analytics_reporting_integration_url_patterns.htm&release=264.0.0&type=5 "Each Analytics event in B2C Commerce 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 Salesforce Reference Architecture (SFRA) and SGJC reference applications use different techniques to construct the URLs.")

[Analytics Reporting Integration in Salesforce Reference Architecture (SFRA)](https://help.salesforce.com/s/articleView?id=cc.b2c_analytics_reporting_integration_sfra.htm&release=264.0.0&type=5 "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.")