To record Analytics events in SGJC, you must 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, you can 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. The server request is triggered via a URL include statement and provides the required parameters.
See Analytics.
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).ReportBasket.isml
: collects Analytics on the
basket.ReportCheckout.isml
: collects Analytics on the
checkout process.ReportOrder.isml
: collects Analytics on
orders.ReportSearch.isml
: collects Analytics on search
results.ReportSourceCodes.isml
: collects Analytics on
source codes.ReportUserRegistration.isml
: collects Analytics
on the user registration process.This template must be referenced 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
This template, referenced via an include statement, logs events that indicate the creation or use of a basket (cart). For example:
<isinclude template="util/reporting/ReportBasket.isml" />
Use the parameters to collect:
In SiteGenesis, this include statement is in the
cart.isml
and minicart.isml
templates.
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
. You must 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.
This template logs the total number of customer orders. This template is called using an include statement. For example:
<isinclude template="util/reporting/ReportOrder.isml"/>
Use the parameters to collect information such as:
In SiteGenesis, the include statement is in the
confirmation.isml
template.
B2C Commerce determines if the current search request is the initial search request or a secondary search specifying other refinement attributes. B2C Commerce only logs initial searches, not refinements. This template can be called using an include statement. For example:
<isinclude template="util/reporting/ReportSearch.isml"/>
Use the parameters to collect information on initial searches.
In
SiteGenesis, the include statement is in the
categoryproducthits.isml
,
foldercontenthits.isml
, and nohits.isml
templates.
If a source code exists in the session, B2C Commerce logs the source code. Place this template on every page that can be a redirect result of an incoming source code to the session or visit. You can place this template on every page, or you can include this template as part of the minicart, which is part of every page.
You can call this template with an include statement. For example:
<isinclude template="util/reporting/ReportSourceCodes.isml"/>
Use the parameters to collect information on:
In SiteGenesis, the include statement is in the
ReportBasket.isml
, ReportOrder.isml
,
ReportBasket.isml
, and redirect.isml
templates.
B2C Commerce tracks
user registration by assigning each iteration of
AccountOpen
a unique ID. B2C Commerce then counts
its occurrence, no matter where it occurs in the storefront, using the
parameters listed in the template.
You can call this template with an include statement, for example:
<isinclude template="util/reporting/ReportUserRegistration.isml"/>
In SiteGenesis, the include statement is in the footer.isml templates.