Logging View Events

View events are logged each time a user visits a page. This information is sent to the Coveo Cloud Analytics service and provides data to Coveo Machine Learning (Coveo ML) for the Coveo Recommendations module (see Getting Recommendations). This page shows you how to configure your Page View Component to start logging view events.

Step 1: Add the Page View Component to a Layout

The Coveo for Sitecore Hive Page View component is a presentation item in Sitecore (see Coveo Page View Analytics). This means that you can add it to any placeholder or pass it as a reference in any MVC layout.

If the component is properly added, you should see a view event logged in your browser network console when you browse to a published Sitecore page.

Step 2: Edit the Component Properties

If you want, you can edit the component properties.

Content Type

The Page View component has a Content Type property that’s used to tag the current page to provide more specific information for the recommendation module. This property is optional and should be used solely to filter recommendations using items matching a specific tag. The values displayed for this property are stored in the TagRepository bucket, located under Sitecore >Settings >Buckets >TagRepository. Insert a Tag in this bucket to use it afterward in this field.

Custom Metadata

You can also specify custom metadata which will be returned when exporting the data from the analytics.

If the Coveo User Context component is added before the Coveo Page View Analytics component, the view events will contain this user context (see Leveraging User Context for Coveo Machine Learning).

Recommended Articles