Log View Events

Legacy feature

This article pertains to achieving relevance with the Coveo Hive framework. Coveo Hive is now in maintenance mode.

See Achieve relevance for guidance on leveraging Coveo Platform relevance features with the Coveo Atomic library.

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

Step 1: Add the Page View Component to a Layout

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

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

Step 2: Edit the Component Options

If you want, you can edit the component options.

Content Type

The Coveo Page View Analytics rendering has a Content Type option that’s used to tag the current page to provide more specific information for the recommendations module. This option should be used solely to filter recommendations using items matching a specific tag. The values displayed for this option 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.

Add Metadata

You can also add metadata to the out-of-the-box metadata that the Coveo Page View Analytics rendering logs.

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