Install
openclaw skills install analytics-sdk-setupUse this skill whenever a user wants a coding agent to audit, install, reconcile, align, or fix TikTok Pixel and/or Meta Pixel code in a real repo — especially for duplicate init, tracking drift, event mapping, consent/CSP/LDU/privacy gating, or unclear analytics ownership.
openclaw skills install analytics-sdk-setupUse this skill when the user wants a coding agent to inspect, install, compare, align, reconcile, or fix TikTok Pixel and Meta Pixel tracking in a real codebase.
Activate it even when the user does not name this skill directly, as long as the real job is repo-level Pixel debugging or alignment work such as duplicate init, broken page-view behavior, tracking drift, event mapping, consent/CSP review, or source-of-truth cleanup.
This skill is for repo-aware coding agents such as Claude Code, Cursor, and similar tools. The agent must inspect the repo, find the shared bootstrap location, avoid duplicate initialization, preserve valid existing integrations, and make privacy/compliance decisions explicit before enabling sensitive tracking.
If the environment does not load SKILL.md directly and instead expects a single prompt block, use:
agent-system-prompt.mdUse SKILL.md as the canonical skill specification and agent-system-prompt.md as the compact runtime summary.
Use this skill for requests like:
Do not use this skill when the user only wants a conceptual explanation without repo analysis or implementation.
This skill is not only about installing or fixing a single Pixel.
Its core objective is to help the agent manage TikTok and Meta as a dual-platform tracking system:
TikTok may appear first in examples or references, but the skill scope is not TikTok-only. Any implementation, audit, or repair should consider both platforms when they are in scope.
Before doing anything, you MUST:
Mode A, Mode B, or Mode C)DO NOT write any code before this step.
If the user request is clearly narrow, such as fixing duplicate initialization or adding one event:
Use quick-fix judgment only when the scope is genuinely narrow and privacy blockers are still resolved.
Quick fix mode does not bypass the output contract. Keep required sections for the chosen mode, but you may keep non-critical governance sections brief or mark them as not applicable.
Activate when the user asks for any of the following:
This should still activate when the user never says "analytics-sdk-setup" but clearly needs repo-aware Pixel inspection, repair, or alignment.
Do not activate the full execution flow when the user is only asking for:
If the user only wants explanation, answer directly instead of running this full skill workflow.
When TikTok and Meta are both in scope, always evaluate the work through these four lenses:
Per-platform correctness
Cross-platform consistency
Ownership and source of truth
Governance over local fixes
When a local fix would make dual-platform governance worse, prefer a plan or governance recommendation over a narrow patch.
Before proposing code changes, choose exactly one execution mode.
Use direct implementation only when all of the following are true:
Use plan-first when the codebase is available but the work is still design-heavy, such as:
You MUST NOT modify code or propose patches in this mode.
Ask the minimum number of high-impact questions first when any blocker is present, including:
You MUST NOT propose implementation or code in this mode.
When in doubt, prefer:
Collect or confirm these inputs before substantial changes.
Do not directly implement sensitive or ambiguous behavior if any of the following is unresolved:
If a blocker exists, switch to plan-first or questions-first instead of guessing.
When information is incomplete, use these defaults:
Always inspect the existing code before adding or moving SDK code.
Follow this order:
single-platform onlydual-platform but ungovernedplatform-correct but cross-platform driftedaligned with intentional platform-specific differencesprivacy/governance blockedBefore changing anything, inspect both direct calls and wrapped integrations.
ttq.load(ttq.page(fbq('init'fbq('track', 'PageView'Check for:
ttq or fbqIf duplicate initialization is found and ownership is clear:
If ownership is not clear, do not auto-merge competing integrations. Switch to plan-first or questions-first.
Use this workflow only in direct-implementation mode.
Do not:
For detailed bootstrap placement, event naming, mapping, payload examples, and verification guidance, consult references/install-and-events.md before implementing event-related changes.
Use this workflow when the repo is available but implementation should not start yet.
Produce a concise implementation-ready report with:
Prefer a plan over direct edits when the main task is still architecture, scope selection, event design, or cross-platform governance.
When TikTok and Meta are both in scope, identify and report:
If ownership is split, the plan or implementation report should say whether that split is intentional, temporary, or the source of current drift.
Before enabling sensitive behavior, explicitly inspect privacy constraints.
For CSP, consent gating, LDU, identifier handling, and shared privacy governance details, consult references/privacy-and-csp.md before implementing those changes.
Use one of the following result structures.
# Analytics SDK questions
## What blocks implementation
- ...
## Decisions that affect both TikTok and Meta
- ...
## Required answers
1. ...
2. ...
3. ...
## Safe progress so far
- ...
Ask the minimum number of high-impact questions. Do not dump the full input checklist if only 2-3 answers are blocking progress.
# Analytics SDK setup plan
## What I confirmed
- Platforms:
- Framework / render path:
- Intended environments:
- Tracking scope:
- Current state by platform:
- Governance state:
## TikTok vs Meta gaps
- ...
## What to unify
- ...
## What remains platform-specific
- ...
## Ownership / source of truth
- ...
## Blockers or missing decisions
- Pixel ID(s):
- CSP status:
- Consent gating:
- LDU rule:
- PII / Advanced Matching:
- Event list:
## Governance recommendation
- ...
## Recommended next step
- ...
# Analytics SDK implementation
## Bootstrap location
- file/path
- why this is the shared render point
## Current state by platform
- TikTok:
- Meta:
## Cross-platform decisions
- ...
## What was unified
- ...
## Intentional platform-specific differences
- ...
## Ownership / source of truth
- ...
## Privacy / compliance decisions
- CSP:
- Consent gating:
- LDU:
- Advanced Matching:
## Event mapping implemented
- business action -> TikTok event -> Meta event -> code location
## TikTok vs Meta gaps that remain
- ...
## Verification
- per-platform correctness holds
- cross-platform consistency is improved or explicitly bounded
- bootstrap initializes once per platform
- target events fire once at the correct business moment
- privacy gates behave as intended
If the task involves:
references/install-and-events.mdreferences/privacy-and-csp.mdKeep vendor snippets, payload examples, and low-level policy details in references, not in this main skill file.
Before writing code, confirm all of the following:
If any item fails, do not proceed with broad implementation.
Before finishing, verify two layers of success.
currency and value when applicable.