SDK Analytics Installer
Installation
SKILL.md
DotCMS SDK Analytics Installation Guide
This skill provides step-by-step instructions for installing and configuring the @dotcms/analytics SDK in the Next.js example project at /core/examples/nextjs.
Overview
The @dotcms/analytics SDK is dotCMS's official JavaScript library for tracking content-aware events and analytics. It provides:
- Automatic page view tracking
- Conversion tracking (purchases, downloads, sign-ups, etc.)
- Custom event tracking
- Session management (30-minute timeout)
- Anonymous user identity tracking
- UTM campaign parameter tracking
- Event batching/queuing for performance
π¨ Important: Understanding the Analytics Components
CRITICAL: useContentAnalytics() ALWAYS requires config as a parameter. The hook does NOT use React Context.