No results found

Introducing App Cloud Content-Level Analytics

The latest version of the App Cloud SDK (1.7.4) introduces content-level analytics for tracking custom events in your template. It's a snap to use, with just two methods:

bc.metrics.startContentSession(contentURI, name)

The above method initiates a "content session"—for example, when a user begins reading a news article. The first argument, contentURI, should be a unique ID or URI. The second argument, name, should be a human-readable description (e.g. an article title) for display in App Cloud Studio.


The above method ends the content session for the given contentURI. In the case of tracking article views, you would typically invoke this method when the user clicks "Back."

See the App Cloud docs for a complete rundown.

Two important notes:

  1. Content-level analytics work only in production mode, meaning you won't see data appear in App Cloud Studio until you publish and deploy an app. Use console.log() to test your code during development.
  2. It is the template author's responsibility to pause and unpause content sessions when the user exits and reenters a view. You can do this by listening for "viewblur" and "viewfocus" events.

Content-level analytics appear in the "Analytics" section of App Cloud Studio:

p.s. Get more tips and tricks (and share your own) by joining the Brightcove App Cloud discussion group on Google.