SDK Analytics Installer

Install and configure the @dotcms/analytics SDK in Next.js/React projects.

322|45|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Microck/ordinary-claude-skills --skill sdk-analytics-installer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: SDK Analytics Installer
Source: https://github.com/Microck/ordinary-claude-skills/tree/main/sdk-analytics-installer
Command: npx skills add https://github.com/Microck/ordinary-claude-skills --skill sdk-analytics-installer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @dotcms/analytics, requests, python-dotenv.

What problem does it solve?

Setting up and configuring analytics SDKs in modern web frameworks like Next.js can be complex, requiring careful placement of components, management of environment variables, and correct hook usage. This Skill provides a step-by-step guide for installing and configuring the @dotcms/analytics SDK.

Core Features & Use Cases

  • Automated Page View Tracking: Easily set up automatic page view tracking on route changes in Next.js/React applications.
  • Custom Event & Conversion Tracking: Implement manual tracking for specific user interactions, form submissions, media plays, and business conversions.
  • Centralized Configuration: Establish a single source of truth for analytics settings, simplifying maintenance and ensuring consistency.
  • Use Case: When you need to add comprehensive analytics to your Next.js e-commerce site, use this skill to install the @dotcms/analytics SDK, configure automatic page view tracking, and implement custom event tracking for product views and purchase conversions.

Quick Start

Install the @dotcms/analytics SDK in my Next.js project and configure it for automatic page view tracking.

Frequently Asked Questions about SDK Analytics Installer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up automatic page view tracking in my Next.js application?

Automatic page view tracking in Next.js requires installing the @dotcms/analytics SDK, wrapping your app with DotContentAnalytics provider, and configuring environment variables in a centralized analytics.config.js file. The provider automatically captures route changes without manual event calls.

Can I track custom events and conversions with the dotCMS analytics SDK?

Yes, the @dotcms/analytics SDK supports custom event tracking through the useContentAnalytics hook, enabling you to manually track specific user interactions like form submissions, product views, and purchase conversions by passing event configuration parameters.

What's the best way to manage analytics configuration across React components?

Establish a centralized analytics.config.js file as a single source of truth for all analytics settings, then pass environment-driven configuration through the useContentAnalytics hook to components. This approach simplifies maintenance and ensures consistency across your application.

Does the dotCMS analytics SDK work with both React and Next.js projects?

The @dotcms/analytics SDK is designed for Next.js and React applications. It targets the Next.js example setup structure but integrates with React's component model, supporting both framework patterns through hooks and provider placement.

What dependencies do I need to install the dotCMS analytics SDK?

Installing the @dotcms/analytics SDK requires the @dotcms/analytics package itself, plus requests and python-dotenv for environment configuration and dependency management during setup and deployment.

Why should I use a centralized analytics configuration instead of inline settings?

Centralized configuration eliminates scattered environment variables and duplicated settings across components, reducing maintenance overhead, preventing configuration drift, and making it easier to update tracking rules globally without code changes in individual components.