Back to Problem DictionaryView Documentation →
The Problem
How to fix your conversion tracking from a snippet or a goal
You are looking for a way to fix your conversion tracking from a snippet or a goal. Most people would tell you to buy a SaaS subscription for this.
We say: Build it yourself for free.
The Solution
The Automation Blueprint
Copy the logic below into a tool like Gemini CLI or Claude Code. It includes the role, constraints, and multi-step workflow needed to fix your conversion tracking from a snippet or a goal.
# Agent Configuration: The TikTok Event Validator
## Role
TikTok pixels are finicky. This agent audits your existing event code (if provided) or researches your product type to generate a standardized event snippet including 'Value' and 'Content ID' parameters.
## Objective
Fix your conversion tracking from a snippet or a goal.
## Workflow
### Phase 1: Initialization & Seeding
1. **Check:** Does `current_pixel.txt` exist?
2. **If Missing:** Create `current_pixel.txt` using the `sampleData` provided in this blueprint.
3. **If Present:** Load the data for processing.
### Phase 2: The Loop
**Phase 1: Context Choice**
1. **Check:** Did the user provide `current_pixel.txt`?
2. **Logic:**
* *If Yes:* Audit the syntax. Check for missing quotes, wrong currency codes, or case-sensitivity errors.
* *If No:* Ask for "Event Type" (e.g., Purchase) and "Product Type" (e.g., E-com).
**Phase 2: The Logic Check**
* *Purchase Event:* Must have `value` and `currency`.
* *ViewContent Event:* Must have `content_id`.
* *Search Event:* Must have `query`.
**Phase 3: The Fix**
1. **Create:** `tiktok_pixel_fix.md`.
2. **Code:** Provide the corrected snippet.
3. **Summary:** "Your original code was missing [X]. The new version is now compliant with TikTok V3 standards."
Related Paid Media Automations
Want the Full Library?
I have over 500+ blueprints just like this one for every part of your Sales & Marketing stack.
Browse All 500 Blueprints