# Implement MixPanel Analytics Safely

Analytics events often drift from schema, PII, and registration standards. This skill guides MixPanel implementation and review for Django optimo_analytics workflows.

## Install

```bash
npx skillstore add diversioteam/mixpanel-analytics
```

## Metadata

- Status: approved
- Slug: diversioteam-mixpanel-analytics
- Skillstore revision: r1
- Version status: missing
- Tree hash: eea329c4a50f43f0e7aba8469b2fb05756f3593fa977399267ad8c85d2c6d240
- Author: DiversioTeam
- GitHub username: DiversioTeam
- License: MIT
- Repository: https://github.com/DiversioTeam/agent-skills-marketplace/tree/main/plugins/mixpanel-analytics/skills/mixpanel-analytics
- Ref: c579efd02184f1128d6741d16e6c8d951d7d4208
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, filesystem, env\_access
- Quality score: 77
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/diversioteam-mixpanel-analytics
- Manifest: https://skillstore.pages.dev/api/skills/diversioteam-mixpanel-analytics/manifest

## Capabilities

- Guides a seven-step workflow for adding MixPanel event constants, schemas, registry entries, services, exports, tests, and integrations.
- Provides schema patterns for UUID strings, enum fields, timestamp conversion, and strict model configuration.
- Reviews analytics changes for PII fields, raw organization IDs, distinct\_id selection, and missing registration.
- Defines service method patterns with keyword-only arguments, fire-and-forget exception handling, and structured logging.
- Lists local validation commands for linting, type checks, Django checks, tests, and targeted analytics scans.
- Produces structured review reports with severity tags, issue descriptions, and recommended fixes.

## Use Cases

- Add a New Analytics Event: Create a tracked event with a constant, schema, registry entry, service helper, export, tests, and business integration.
- Review PII-Safe Tracking: Audit analytics changes for names, emails, phone numbers, addresses, UUID typing, and approved organization fields.
- Standardize Event Implementation: Check that analytics events follow naming, distinct\_id, timestamp, cron, service, and test conventions before merge.

## Prompt Templates

### Implement a Basic Event

```
Use mixpanel-analytics to add tracking when a user completes profile setup. Follow the seven-step checklist and include tests.
```

### Review Staged Changes

```
Use mixpanel-analytics review on my staged analytics changes. Focus on PII protection, schema registration, service patterns, and test coverage.
```

### Design a Cron Event

```
Use mixpanel-analytics to design a background-job event. Explain whether is_cron_job is needed and how timestamps should be handled.
```

### Audit the Module

```
Use mixpanel-analytics review across optimo_analytics. Produce a severity-tagged report with issues, evidence, and fixes.
```

## Limitations

- The guidance is tailored to Django4Lyfe and the optimo\_analytics module structure.
- It does not connect to MixPanel or validate events against a live MixPanel workspace.
- It depends on project files, local tooling, and test fixtures being available.
- It cannot decide business event strategy without product and analytics context.

## Best Practices

- Confirm event purpose and approved analytics fields before adding schema properties.
- Use UUID strings and approved organization fields, never direct personal data.
- Run focused tests and review output before merging analytics changes.

## Anti Patterns

- Adding names, emails, phone numbers, addresses, or raw personal data to event schemas.
- Registering a service helper without adding schema, registry, export, and tests.
- Using raw organization IDs as distinct\_id instead of the documented fallback prefixes.

## Security Audit

- Audited at: 2026-07-05T13:17:40.072\+00:00
- Summary: The static alerts are false positives from Markdown backticks, documented local validation snippets, and terminology such as API key identifiers. No prompt injection, credential exfiltration, malicious network behavior, destructive file operation, or hidden command execution was found in SKILL.md.

## Stats

- Views: 179
- Downloads: 14
- Favorites: 0
- Popularity score: 0
