Skip to main content

Content Viewing Tracker

Content Viewing Tracker helps WinnerWare measure which content users actually read and turns that activity into reusable top-viewed content experiences.

Overview​

This module is useful when teams want to understand which content is getting attention and expose that activity back to users or administrators as a ranked list.

It combines two practical capabilities:

  1. track views for selected content types
  2. display the most-viewed items through widgets or dashboard cards

Key Features​

  • Adds a Content Viewing settings area.
  • Lets administrators choose which content types should be tracked.
  • Records view totals for supported content items.
  • Adds a Top Viewed Content Items widget.
  • Adds a dashboard version of the same top-viewed widget when dashboard support is enabled.

How It Works​

After administrators choose which content types should be tracked, the module records views when a published content item is displayed in its main detail view.

Those view totals can then be reused in a widget that lists the most-viewed items. Editors can control how many items appear and how long the ranked results should be cached.

Configuration​

Admin display nameFeature IDNotes
Content Viewing TrackerCloudSolutions.Content.ViewingTrackerEnables view tracking, tracking settings, and top-viewed widgets.

Settings location​

  • Settings -> Content Viewing

Permission​

PermissionPurpose
Manage Content Viewing SettingsLets administrators manage which content types are tracked.

Content viewing settings​

SettingPurpose
Content TypesSelects the content types whose published detail views should be tracked.

Top-viewed widget fields​

FieldPurpose
Total Visible ItemsSets how many top-viewed items appear in the widget.
Total Minutes to CacheSets how long the widget result should be cached before recalculating.

Usage​

Use this module when teams want to highlight popular content, monitor engagement trends, or add a quick "top viewed" experience to a landing page, knowledge area, or admin dashboard.

In the current solution, the dashboard widget pattern is already used in knowledge-focused setup content.

Example setup​

One clear setup pattern is:

  1. open Settings -> Content Viewing
  2. choose the content types that should count views
  3. create a Top Viewed Content Items widget or dashboard widget
  4. set the visible item count and cache duration for that widget
  5. place the widget where teams want users or administrators to see popular content

Developer Notes​

  • Tracking is limited to published detail views of the selected content types.
  • The module stores both total view counts and per-view records.
  • One request records a maximum of one view for each content item.
  • A view record always references the published version of its content item. The module finds that version in ContentItemIndex and does not use the Id of the content item in memory, because a content item that was built or changed in memory can carry the Id of a different document, for example a workflow instance. When the two are different, the module writes a warning to the log with the content item, both Ids and the request path.
  • The ContentItemsViewingIndex and ContentViewingIndex tables have no foreign key to the Document table, so their rows do not block the delete of a document. Migration version 4 removes the foreign keys. Before it removes them, it moves the records that reference a document of a different content item to the published version of that content item, and deletes the rows that it cannot move.
  • The Rebuild content viewing counters background task runs every 10 minutes. It deletes the records and counters that do not reference a version of their own content item (for example, because the document was deleted), then rebuilds the counters from the records.
  • Per-view records also capture optional source, query, and utility markers when they are present in the request.
  • The content admin list can be filtered with a viewed-at term for date-based view analysis.