Tag each store JSP file with the vendor-specific tag library
that you create. When customers browse these tagged pages in your
WebSphere 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
- Navigate to the directory that contains your site JSP files.
Typically, the JSP files are stored in the WC_eardir/Stores.war/storedir directory.
For example, the JSP files for the Madisons starter store,
are in the WC_eardir/Stores.war/Madisons/ folder.
- For the page view tag: 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. - Add the appropriate vendor-specific tags to the bottom
of each relevant store JSP file. The 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.