Tagging your store pages for the external analytics system

Tag each store JSP file with the vendor-specific tag library that you create. When customers browse these tagged pages in your HCL Commerce site, data is collected and sent to the external analytics system based on the programming logic in the vendor-specific tag classes. The external analytics system can then use this data to perform its analytics work.

Procedure

  1. Navigate to the directory that contains your site JSP files.
    For example, the JSP files for the Aurora starter store, are in the workspace_dir/crs-web/WebContent/AuroraStorefrontAssetStore folder.
  2. If the name that you use for the page view tag is pageview, you can use the auto tagging utility to tag your JSP with this tag.
  3. Add the appropriate vendor-specific tags to the bottom of each relevant store JSP file. Store JSP files must also refer to the tag library definition file you created. Place the tags immediately above the </body> tag in the JSP file, as shown in the following example for a product display page:
    ...
    ...
    <%@ taglib uri="http://commerce.your_company_name.com/mytld"  prefix="mytld" %>
    ...
    ...
    ...
    <!-- Vendor-specific analytics tags -->
    <mytld:product databean="${product}" />
    <mytld:pageview />
    </body>
    ...
    ...
    Note: The previous code snippet assumes that you create two tags named pageview and product.