bobo-ai-cli 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +259 -259
  3. package/bundled-skills/CORE_SKILLS.txt +18 -18
  4. package/bundled-skills/backend-expert/SKILL.md +97 -97
  5. package/bundled-skills/code-review/SKILL.md +280 -280
  6. package/bundled-skills/code-review-expert/SKILL.md +85 -85
  7. package/bundled-skills/context-budget-analyzer/SKILL.md +76 -76
  8. package/bundled-skills/context-compressor/SKILL.md +75 -75
  9. package/bundled-skills/context-optimization-suite/SKILL.md +162 -162
  10. package/bundled-skills/frontend-expert/SKILL.md +93 -93
  11. package/bundled-skills/github/SKILL.md +12 -12
  12. package/bundled-skills/high-agency/SKILL.md +473 -473
  13. package/bundled-skills/high-agency/references/builder-patterns.md +126 -126
  14. package/bundled-skills/high-agency/references/recovery-playbook.md +298 -298
  15. package/bundled-skills/memory-manager/SKILL.md +214 -214
  16. package/bundled-skills/memory-manager/references/advanced-config.md +65 -65
  17. package/bundled-skills/orchestrator/SKILL.md +681 -681
  18. package/bundled-skills/planning-with-files/SKILL.md +193 -193
  19. package/bundled-skills/skill-creator/SKILL.md +220 -220
  20. package/bundled-skills/testing-expert/SKILL.md +99 -99
  21. package/bundled-skills/verify/SKILL.md +15 -15
  22. package/dist/agent.d.ts +5 -0
  23. package/dist/agent.js +11 -1
  24. package/dist/agent.js.map +1 -1
  25. package/dist/agents/catalog.d.ts +47 -0
  26. package/dist/agents/catalog.js +63 -5
  27. package/dist/agents/catalog.js.map +1 -1
  28. package/dist/agents/router.d.ts +12 -1
  29. package/dist/agents/router.js +43 -3
  30. package/dist/agents/router.js.map +1 -1
  31. package/dist/agents/spawn.js +36 -18
  32. package/dist/agents/spawn.js.map +1 -1
  33. package/dist/autonomous.js +5 -5
  34. package/dist/cli.js +23 -21
  35. package/dist/cli.js.map +1 -1
  36. package/dist/compactor.js +39 -39
  37. package/dist/dream.js +29 -29
  38. package/dist/image-input.d.ts +44 -0
  39. package/dist/image-input.js +161 -0
  40. package/dist/image-input.js.map +1 -0
  41. package/dist/memory.js +13 -13
  42. package/dist/project.js +15 -15
  43. package/dist/repl.js +88 -0
  44. package/dist/repl.js.map +1 -1
  45. package/dist/skills.js +54 -54
  46. package/dist/sub-agents.js +65 -65
  47. package/dist/tools/browser.js +21 -21
  48. package/dist/tools/claude-code.js +10 -10
  49. package/dist/web.js +7 -7
  50. package/dist/wiki-commands.d.ts +2 -0
  51. package/dist/wiki-commands.js +249 -0
  52. package/dist/wiki-commands.js.map +1 -0
  53. package/dist/wiki.d.ts +90 -0
  54. package/dist/wiki.js +614 -0
  55. package/dist/wiki.js.map +1 -0
  56. package/knowledge/advanced-patterns.md +70 -70
  57. package/knowledge/agent-directives.md +74 -74
  58. package/knowledge/api-integration-patterns.md +102 -0
  59. package/knowledge/code-review-protocol.md +69 -0
  60. package/knowledge/dream.md +36 -36
  61. package/knowledge/engineering.md +52 -46
  62. package/knowledge/error-catalog.md +38 -33
  63. package/knowledge/event-driven-architecture.md +43 -0
  64. package/knowledge/external-alignment.md +47 -0
  65. package/knowledge/high-agency.md +73 -0
  66. package/knowledge/image-generation.md +48 -0
  67. package/knowledge/index.json +194 -169
  68. package/knowledge/llm-wiki-pattern.md +71 -0
  69. package/knowledge/long-task-management.md +79 -0
  70. package/knowledge/memory/cache-optimization-and-skill-integration.md +102 -102
  71. package/knowledge/memory/engineering-patterns.md +134 -134
  72. package/knowledge/memory/feedback_root_structure.md +15 -15
  73. package/knowledge/memory/project-contexts.md +69 -69
  74. package/knowledge/memory/tools-and-services.md +85 -85
  75. package/knowledge/memory-management.md +72 -0
  76. package/knowledge/rules/advisor-strategy.md +204 -0
  77. package/knowledge/rules/agents.md +62 -62
  78. package/knowledge/rules/blocking-rules.md +323 -323
  79. package/knowledge/rules/cache-management.md +379 -379
  80. package/knowledge/rules/capability-evolution.md +132 -132
  81. package/knowledge/rules/coding.md +126 -126
  82. package/knowledge/rules/engineering-workflows.md +225 -225
  83. package/knowledge/rules/evomap-content-guidelines.md +354 -354
  84. package/knowledge/rules/evomap-guide.md +224 -224
  85. package/knowledge/rules/external-alignment.md +22 -0
  86. package/knowledge/rules/git.md +31 -31
  87. package/knowledge/rules/hooks.md +106 -106
  88. package/knowledge/rules/performance.md +101 -101
  89. package/knowledge/rules/remotion-auto-production.md +1120 -1120
  90. package/knowledge/rules/security.md +46 -46
  91. package/knowledge/rules/testing.md +32 -32
  92. package/knowledge/rules/work-mode.md +208 -208
  93. package/knowledge/rules.md +62 -62
  94. package/knowledge/self-evolution.md +78 -0
  95. package/knowledge/self-rationalization-guard.md +52 -0
  96. package/knowledge/skills/Skill_Seekers.md +1722 -1722
  97. package/knowledge/skills/ab-test-setup.md +557 -557
  98. package/knowledge/skills/agent-sdk-dev.md +238 -238
  99. package/knowledge/skills/agent-tools.md +136 -136
  100. package/knowledge/skills/analytics-tracking.md +597 -597
  101. package/knowledge/skills/artifacts-builder.md +89 -89
  102. package/knowledge/skills/asana.md +12 -12
  103. package/knowledge/skills/backend-expert.md +97 -97
  104. package/knowledge/skills/brand-voice.md +481 -481
  105. package/knowledge/skills/browser-use.md +419 -419
  106. package/knowledge/skills/cache-optimization-skill.md +179 -179
  107. package/knowledge/skills/canvas-design.md +147 -147
  108. package/knowledge/skills/citation-validator.md +203 -203
  109. package/knowledge/skills/clangd-lsp.md +52 -52
  110. package/knowledge/skills/code-review-expert.md +85 -85
  111. package/knowledge/skills/code-review.md +280 -280
  112. package/knowledge/skills/code-simplifier.md +12 -12
  113. package/knowledge/skills/commit-commands.md +258 -258
  114. package/knowledge/skills/competitor-alternatives.md +795 -795
  115. package/knowledge/skills/content-atomizer.md +910 -910
  116. package/knowledge/skills/content-research-writer.md +605 -605
  117. package/knowledge/skills/context-optimization-suite.md +162 -162
  118. package/knowledge/skills/context7.md +12 -12
  119. package/knowledge/skills/copy-editing.md +494 -494
  120. package/knowledge/skills/copywriting.md +510 -510
  121. package/knowledge/skills/csharp-lsp.md +40 -40
  122. package/knowledge/skills/decision-making-framework.md +154 -154
  123. package/knowledge/skills/developer-growth-analysis.md +335 -335
  124. package/knowledge/skills/direct-response-copy.md +2336 -2336
  125. package/knowledge/skills/docker-expert.md +229 -229
  126. package/knowledge/skills/document-skills.md +12 -12
  127. package/knowledge/skills/documentation-expert.md +126 -126
  128. package/knowledge/skills/email-sequence.md +1061 -1061
  129. package/knowledge/skills/email-sequences.md +910 -910
  130. package/knowledge/skills/example-plugin.md +72 -72
  131. package/knowledge/skills/explanatory-output-style.md +82 -82
  132. package/knowledge/skills/feature-dev.md +458 -458
  133. package/knowledge/skills/file-organizer.md +466 -466
  134. package/knowledge/skills/firebase.disabled.md +12 -12
  135. package/knowledge/skills/form-cro.md +488 -488
  136. package/knowledge/skills/free-tool-strategy.md +636 -636
  137. package/knowledge/skills/frontend-design-offical.md +55 -55
  138. package/knowledge/skills/frontend-design.md +41 -41
  139. package/knowledge/skills/frontend-expert.md +93 -93
  140. package/knowledge/skills/github.md +12 -12
  141. package/knowledge/skills/gitlab.md +12 -12
  142. package/knowledge/skills/gopls-lsp.md +32 -32
  143. package/knowledge/skills/got-controller.md +218 -218
  144. package/knowledge/skills/greptile.md +72 -72
  145. package/knowledge/skills/hookify.md +376 -376
  146. package/knowledge/skills/image-editor.md +189 -189
  147. package/knowledge/skills/image-enhancer.md +109 -109
  148. package/knowledge/skills/jdtls-lsp.md +49 -49
  149. package/knowledge/skills/json-canvas.md +654 -654
  150. package/knowledge/skills/keyword-research.md +559 -559
  151. package/knowledge/skills/kotlin-lsp.md +28 -28
  152. package/knowledge/skills/laravel-boost.md +12 -12
  153. package/knowledge/skills/launch-strategy.md +394 -394
  154. package/knowledge/skills/lead-magnet.md +393 -393
  155. package/knowledge/skills/learning-output-style.md +106 -106
  156. package/knowledge/skills/linear.md +12 -12
  157. package/knowledge/skills/lua-lsp.md +47 -47
  158. package/knowledge/skills/marketing-ideas.md +720 -720
  159. package/knowledge/skills/marketing-psychology.md +534 -534
  160. package/knowledge/skills/mcp-builder.md +369 -369
  161. package/knowledge/skills/meeting-insights-analyzer.md +347 -347
  162. package/knowledge/skills/memory-evolution-system.md +172 -172
  163. package/knowledge/skills/multi-lens-thinking.md +407 -407
  164. package/knowledge/skills/nano-banana-pro.md +116 -116
  165. package/knowledge/skills/newsletter.md +736 -736
  166. package/knowledge/skills/notebooklm.md +296 -296
  167. package/knowledge/skills/obsidian-bases.md +634 -634
  168. package/knowledge/skills/obsidian-markdown.md +651 -651
  169. package/knowledge/skills/onboarding-cro.md +494 -494
  170. package/knowledge/skills/orchestrator.md +681 -681
  171. package/knowledge/skills/page-cro.md +379 -379
  172. package/knowledge/skills/paid-ads.md +624 -624
  173. package/knowledge/skills/paywall-upgrade-cro.md +651 -651
  174. package/knowledge/skills/php-lsp.md +36 -36
  175. package/knowledge/skills/planning-with-files.md +193 -193
  176. package/knowledge/skills/playwright.md +12 -12
  177. package/knowledge/skills/plugin-dev.md +434 -434
  178. package/knowledge/skills/popup-cro.md +520 -520
  179. package/knowledge/skills/positioning-angles.md +330 -330
  180. package/knowledge/skills/pr-review-toolkit.md +359 -359
  181. package/knowledge/skills/pricing-strategy.md +777 -777
  182. package/knowledge/skills/programmatic-seo.md +714 -714
  183. package/knowledge/skills/pyright-lsp.md +43 -43
  184. package/knowledge/skills/quality-assurance-framework.md +168 -168
  185. package/knowledge/skills/question-refiner.md +160 -160
  186. package/knowledge/skills/ralph-loop.md +205 -205
  187. package/knowledge/skills/refactoring-expert.md +103 -103
  188. package/knowledge/skills/referral-program.md +668 -668
  189. package/knowledge/skills/research-executor.md +164 -164
  190. package/knowledge/skills/review-with-security.md +12 -12
  191. package/knowledge/skills/rust-analyzer-lsp.md +50 -50
  192. package/knowledge/skills/schema-markup.md +647 -647
  193. package/knowledge/skills/security-audit-expert.md +124 -124
  194. package/knowledge/skills/security-expert.md +140 -140
  195. package/knowledge/skills/security-guidance.md +12 -12
  196. package/knowledge/skills/seedance-prompt.md +139 -139
  197. package/knowledge/skills/self-evolution.md +1160 -1160
  198. package/knowledge/skills/seo-audit.md +432 -432
  199. package/knowledge/skills/seo-content.md +787 -787
  200. package/knowledge/skills/serena.md +12 -12
  201. package/knowledge/skills/signup-flow-cro.md +409 -409
  202. package/knowledge/skills/skill-creator.md +220 -220
  203. package/knowledge/skills/skill-manager.md +226 -226
  204. package/knowledge/skills/skill-share.md +98 -98
  205. package/knowledge/skills/slack.md +12 -12
  206. package/knowledge/skills/social-content.md +878 -878
  207. package/knowledge/skills/spec-flow-skill.md +124 -124
  208. package/knowledge/skills/stripe.md +12 -12
  209. package/knowledge/skills/supabase.md +12 -12
  210. package/knowledge/skills/swift-lsp.md +40 -40
  211. package/knowledge/skills/synthesizer.md +236 -236
  212. package/knowledge/skills/template-skill.md +16 -16
  213. package/knowledge/skills/testing-expert.md +99 -99
  214. package/knowledge/skills/theme-factory.md +72 -72
  215. package/knowledge/skills/tiktok-research.md +208 -208
  216. package/knowledge/skills/typescript-lsp.md +36 -36
  217. package/knowledge/skills/ui-ux-pro-max.md +247 -247
  218. package/knowledge/skills/verify.md +15 -15
  219. package/knowledge/skills/visual-prompt-engineer.md +102 -102
  220. package/knowledge/skills/webapp-testing.md +111 -111
  221. package/knowledge/skills/wide-research.md +191 -191
  222. package/knowledge/system.md +93 -93
  223. package/knowledge/task-router.md +46 -37
  224. package/knowledge/verification.md +38 -38
  225. package/knowledge/worker-prompt-craft.md +66 -0
  226. package/knowledge/workflows/3d-viz.md +47 -47
  227. package/knowledge/workflows/data-pipeline.md +47 -47
  228. package/knowledge/workflows/db-migration.md +51 -51
  229. package/knowledge/workflows/feature-dev.md +41 -41
  230. package/knowledge/workflows/tdd-flow.md +52 -52
  231. package/knowledge/workflows/ui-verify.md +51 -51
  232. package/package.json +74 -74
  233. package/dist/claude-bridge.d.ts +0 -18
  234. package/dist/claude-bridge.js +0 -91
  235. package/dist/claude-bridge.js.map +0 -1
  236. package/dist/tools/claude-bridge-tool.d.ts +0 -4
  237. package/dist/tools/claude-bridge-tool.js +0 -44
  238. package/dist/tools/claude-bridge-tool.js.map +0 -1
@@ -1,597 +1,597 @@
1
- ---
2
- id: "analytics-tracking"
3
- title: "Analytics Tracking"
4
- category: "marketing"
5
- tags: ["analytics tracking", "initial assessment", "core principles", "tracking plan framework", "event naming conventions", "essential events to track", "event properties (parameters)", "ga4 implementation", "utm parameter strategy", "debugging and validation"]
6
- triggers: []
7
- dependencies: []
8
- source: "E:/Bobo's Coding cache/.claude/skills/analytics-tracking"
9
- ---
10
-
11
- ---
12
- name: analytics-tracking
13
- description: When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," or "tracking plan." For A/B test measurement, see ab-test-setup.
14
- ---
15
-
16
- # Analytics Tracking
17
-
18
- You are an expert in analytics implementation and measurement. Your goal is to help set up tracking that provides actionable insights for marketing and product decisions.
19
-
20
- ## Initial Assessment
21
-
22
- Before implementing tracking, understand:
23
-
24
- 1. **Business Context**
25
- - What decisions will this data inform?
26
- - What are the key conversion actions?
27
- - What questions need answering?
28
-
29
- 2. **Current State**
30
- - What tracking exists?
31
- - What tools are in use (GA4, Mixpanel, Amplitude, etc.)?
32
- - What's working/not working?
33
-
34
- 3. **Technical Context**
35
- - What's the tech stack?
36
- - Who will implement and maintain?
37
- - Any privacy/compliance requirements?
38
-
39
- ---
40
-
41
- ## Core Principles
42
-
43
- ### 1. Track for Decisions, Not Data
44
-
45
- - Every event should inform a decision
46
- - Avoid vanity metrics
47
- - Quality > quantity of events
48
-
49
- ### 2. Start with the Questions
50
-
51
- - What do you need to know?
52
- - What actions will you take based on this data?
53
- - Work backwards to what you need to track
54
-
55
- ### 3. Name Things Consistently
56
-
57
- - Naming conventions matter
58
- - Establish patterns before implementing
59
- - Document everything
60
-
61
- ### 4. Maintain Data Quality
62
-
63
- - Validate implementation
64
- - Monitor for issues
65
- - Clean data > more data
66
-
67
- ---
68
-
69
- ## Tracking Plan Framework
70
-
71
- ### Structure
72
-
73
- ```
74
- Event Name | Event Category | Properties | Trigger | Notes
75
- ---------- | ------------- | ---------- | ------- | -----
76
- ```
77
-
78
- ### Event Types
79
-
80
- **Pageviews**
81
-
82
- - Automatic in most tools
83
- - Enhanced with page metadata
84
-
85
- **User Actions**
86
-
87
- - Button clicks
88
- - Form submissions
89
- - Feature usage
90
- - Content interactions
91
-
92
- **System Events**
93
-
94
- - Signup completed
95
- - Purchase completed
96
- - Subscription changed
97
- - Errors occurred
98
-
99
- **Custom Conversions**
100
-
101
- - Goal completions
102
- - Funnel stages
103
- - Business-specific milestones
104
-
105
- ---
106
-
107
- ## Event Naming Conventions
108
-
109
- ### Format Options
110
-
111
- **Object-Action (Recommended)**
112
-
113
- ```
114
- signup_completed
115
- button_clicked
116
- form_submitted
117
- article_read
118
- ```
119
-
120
- **Action-Object**
121
-
122
- ```
123
- click_button
124
- submit_form
125
- complete_signup
126
- ```
127
-
128
- **Category_Object_Action**
129
-
130
- ```
131
- checkout_payment_completed
132
- blog_article_viewed
133
- onboarding_step_completed
134
- ```
135
-
136
- ### Best Practices
137
-
138
- - Lowercase with underscores
139
- - Be specific: `cta_hero_clicked` vs. `button_clicked`
140
- - Include context in properties, not event name
141
- - Avoid spaces and special characters
142
- - Document decisions
143
-
144
- ---
145
-
146
- ## Essential Events to Track
147
-
148
- ### Marketing Site
149
-
150
- **Navigation**
151
-
152
- - page_view (enhanced)
153
- - outbound_link_clicked
154
- - scroll_depth (25%, 50%, 75%, 100%)
155
-
156
- **Engagement**
157
-
158
- - cta_clicked (button_text, location)
159
- - video_played (video_id, duration)
160
- - form_started
161
- - form_submitted (form_type)
162
- - resource_downloaded (resource_name)
163
-
164
- **Conversion**
165
-
166
- - signup_started
167
- - signup_completed
168
- - demo_requested
169
- - contact_submitted
170
-
171
- ### Product/App
172
-
173
- **Onboarding**
174
-
175
- - signup_completed
176
- - onboarding_step_completed (step_number, step_name)
177
- - onboarding_completed
178
- - first_key_action_completed
179
-
180
- **Core Usage**
181
-
182
- - feature_used (feature_name)
183
- - action_completed (action_type)
184
- - session_started
185
- - session_ended
186
-
187
- **Monetization**
188
-
189
- - trial_started
190
- - pricing_viewed
191
- - checkout_started
192
- - purchase_completed (plan, value)
193
- - subscription_cancelled
194
-
195
- ### E-commerce
196
-
197
- **Browsing**
198
-
199
- - product_viewed (product_id, category, price)
200
- - product_list_viewed (list_name, products)
201
- - product_searched (query, results_count)
202
-
203
- **Cart**
204
-
205
- - product_added_to_cart
206
- - product_removed_from_cart
207
- - cart_viewed
208
-
209
- **Checkout**
210
-
211
- - checkout_started
212
- - checkout_step_completed (step)
213
- - payment_info_entered
214
- - purchase_completed (order_id, value, products)
215
-
216
- ---
217
-
218
- ## Event Properties (Parameters)
219
-
220
- ### Standard Properties to Consider
221
-
222
- **Page/Screen**
223
-
224
- - page_title
225
- - page_location (URL)
226
- - page_referrer
227
- - content_group
228
-
229
- **User**
230
-
231
- - user_id (if logged in)
232
- - user_type (free, paid, admin)
233
- - account_id (B2B)
234
- - plan_type
235
-
236
- **Campaign**
237
-
238
- - source
239
- - medium
240
- - campaign
241
- - content
242
- - term
243
-
244
- **Product** (e-commerce)
245
-
246
- - product_id
247
- - product_name
248
- - category
249
- - price
250
- - quantity
251
- - currency
252
-
253
- **Timing**
254
-
255
- - timestamp
256
- - session_duration
257
- - time_on_page
258
-
259
- ### Best Practices
260
-
261
- - Use consistent property names
262
- - Include relevant context
263
- - Don't duplicate GA4 automatic properties
264
- - Avoid PII in properties
265
- - Document expected values
266
-
267
- ---
268
-
269
- ## GA4 Implementation
270
-
271
- ### Configuration
272
-
273
- **Data Streams**
274
-
275
- - One stream per platform (web, iOS, Android)
276
- - Enable enhanced measurement
277
-
278
- **Enhanced Measurement Events**
279
-
280
- - page_view (automatic)
281
- - scroll (90% depth)
282
- - outbound_click
283
- - site_search
284
- - video_engagement
285
- - file_download
286
-
287
- **Recommended Events**
288
-
289
- - Use Google's predefined events when possible
290
- - Correct naming for enhanced reporting
291
- - See: https://support.google.com/analytics/answer/9267735
292
-
293
- ### Custom Events (GA4)
294
-
295
- ```javascript
296
- // gtag.js
297
- gtag('event', 'signup_completed', {
298
- method: 'email',
299
- plan: 'free',
300
- });
301
-
302
- // Google Tag Manager (dataLayer)
303
- dataLayer.push({
304
- event: 'signup_completed',
305
- method: 'email',
306
- plan: 'free',
307
- });
308
- ```
309
-
310
- ### Conversions Setup
311
-
312
- 1. Collect event in GA4
313
- 2. Mark as conversion in Admin > Events
314
- 3. Set conversion counting (once per session or every time)
315
- 4. Import to Google Ads if needed
316
-
317
- ### Custom Dimensions and Metrics
318
-
319
- **When to use:**
320
-
321
- - Properties you want to segment by
322
- - Metrics you want to aggregate
323
- - Beyond standard parameters
324
-
325
- **Setup:**
326
-
327
- 1. Create in Admin > Custom definitions
328
- 2. Scope: Event, User, or Item
329
- 3. Parameter name must match
330
-
331
- ---
332
-
333
- ## Google Tag Manager Implementation
334
-
335
- ### Container Structure
336
-
337
- **Tags**
338
-
339
- - GA4 Configuration (base)
340
- - GA4 Event tags (one per event or grouped)
341
- - Conversion pixels (Facebook, LinkedIn, etc.)
342
-
343
- **Triggers**
344
-
345
- - Page View (DOM Ready, Window Loaded)
346
- - Click - All Elements / Just Links
347
- - Form Submission
348
- - Custom Events
349
-
350
- **Variables**
351
-
352
- - Built-in: Click Text, Click URL, Page Path, etc.
353
- - Data Layer variables
354
- - JavaScript variables
355
- - Lookup tables
356
-
357
- ### Best Practices
358
-
359
- - Use folders to organize
360
- - Consistent naming (Tag_Type_Description)
361
- - Version notes on every publish
362
- - Preview mode for testing
363
- - Workspaces for team collaboration
364
-
365
- ### Data Layer Pattern
366
-
367
- ```javascript
368
- // Push custom event
369
- dataLayer.push({
370
- event: 'form_submitted',
371
- form_name: 'contact',
372
- form_location: 'footer',
373
- });
374
-
375
- // Set user properties
376
- dataLayer.push({
377
- user_id: '12345',
378
- user_type: 'premium',
379
- });
380
-
381
- // E-commerce event
382
- dataLayer.push({
383
- event: 'purchase',
384
- ecommerce: {
385
- transaction_id: 'T12345',
386
- value: 99.99,
387
- currency: 'USD',
388
- items: [
389
- {
390
- item_id: 'SKU123',
391
- item_name: 'Product Name',
392
- price: 99.99,
393
- },
394
- ],
395
- },
396
- });
397
- ```
398
-
399
- ---
400
-
401
- ## UTM Parameter Strategy
402
-
403
- ### Standard Parameters
404
-
405
- | Parameter | Purpose | Example |
406
- | ------------ | ------------------------ | ---------------------------- |
407
- | utm_source | Where traffic comes from | google, facebook, newsletter |
408
- | utm_medium | Marketing medium | cpc, email, social, referral |
409
- | utm_campaign | Campaign name | spring_sale, product_launch |
410
- | utm_content | Differentiate versions | hero_cta, sidebar_link |
411
- | utm_term | Paid search keywords | running+shoes |
412
-
413
- ### Naming Conventions
414
-
415
- **Lowercase everything**
416
-
417
- - google, not Google
418
- - email, not Email
419
-
420
- **Use underscores or hyphens consistently**
421
-
422
- - product_launch or product-launch
423
- - Pick one, stick with it
424
-
425
- **Be specific but concise**
426
-
427
- - blog_footer_cta, not cta1
428
- - 2024_q1_promo, not promo
429
-
430
- ### UTM Documentation
431
-
432
- Track all UTMs in a spreadsheet or tool:
433
-
434
- | Campaign | Source | Medium | Content | Full URL | Owner | Date |
435
- | -------- | ------ | ------ | ------- | -------- | ----- | ---- |
436
- | ... | ... | ... | ... | ... | ... | ... |
437
-
438
- ### UTM Builder
439
-
440
- Provide a consistent UTM builder link to team:
441
-
442
- - Google's URL builder
443
- - Internal tool
444
- - Spreadsheet formula
445
-
446
- ---
447
-
448
- ## Debugging and Validation
449
-
450
- ### Testing Tools
451
-
452
- **GA4 DebugView**
453
-
454
- - Real-time event monitoring
455
- - Enable with ?debug_mode=true
456
- - Or via Chrome extension
457
-
458
- **GTM Preview Mode**
459
-
460
- - Test triggers and tags
461
- - See data layer state
462
- - Validate before publish
463
-
464
- **Browser Extensions**
465
-
466
- - GA Debugger
467
- - Tag Assistant
468
- - dataLayer Inspector
469
-
470
- ### Validation Checklist
471
-
472
- - [ ] Events firing on correct triggers
473
- - [ ] Property values populating correctly
474
- - [ ] No duplicate events
475
- - [ ] Works across browsers
476
- - [ ] Works on mobile
477
- - [ ] Conversions recorded correctly
478
- - [ ] User ID passing when logged in
479
- - [ ] No PII leaking
480
-
481
- ### Common Issues
482
-
483
- **Events not firing**
484
-
485
- - Trigger misconfigured
486
- - Tag paused
487
- - GTM not loaded on page
488
-
489
- **Wrong values**
490
-
491
- - Variable not configured
492
- - Data layer not pushing correctly
493
- - Timing issues (fire before data ready)
494
-
495
- **Duplicate events**
496
-
497
- - Multiple GTM containers
498
- - Multiple tag instances
499
- - Trigger firing multiple times
500
-
501
- ---
502
-
503
- ## Privacy and Compliance
504
-
505
- ### Considerations
506
-
507
- - Cookie consent required in EU/UK/CA
508
- - No PII in analytics properties
509
- - Data retention settings
510
- - User deletion capabilities
511
- - Cross-device tracking consent
512
-
513
- ### Implementation
514
-
515
- **Consent Mode (GA4)**
516
-
517
- - Wait for consent before tracking
518
- - Use consent mode for partial tracking
519
- - Integrate with consent management platform
520
-
521
- **Data Minimization**
522
-
523
- - Only collect what you need
524
- - IP anonymization
525
- - No PII in custom dimensions
526
-
527
- ---
528
-
529
- ## Output Format
530
-
531
- ### Tracking Plan Document
532
-
533
- ```
534
- # [Site/Product] Tracking Plan
535
-
536
- ## Overview
537
- - Tools: GA4, GTM
538
- - Last updated: [Date]
539
- - Owner: [Name]
540
-
541
- ## Events
542
-
543
- ### Marketing Events
544
-
545
- | Event Name | Description | Properties | Trigger |
546
- |------------|-------------|------------|---------|
547
- | signup_started | User initiates signup | source, page | Click signup CTA |
548
- | signup_completed | User completes signup | method, plan | Signup success page |
549
-
550
- ### Product Events
551
- [Similar table]
552
-
553
- ## Custom Dimensions
554
-
555
- | Name | Scope | Parameter | Description |
556
- |------|-------|-----------|-------------|
557
- | user_type | User | user_type | Free, trial, paid |
558
-
559
- ## Conversions
560
-
561
- | Conversion | Event | Counting | Google Ads |
562
- |------------|-------|----------|------------|
563
- | Signup | signup_completed | Once per session | Yes |
564
-
565
- ## UTM Convention
566
-
567
- [Guidelines]
568
- ```
569
-
570
- ### Implementation Code
571
-
572
- Provide ready-to-use code snippets
573
-
574
- ### Testing Checklist
575
-
576
- Specific validation steps
577
-
578
- ---
579
-
580
- ## Questions to Ask
581
-
582
- If you need more context:
583
-
584
- 1. What tools are you using (GA4, Mixpanel, etc.)?
585
- 2. What key actions do you want to track?
586
- 3. What decisions will this data inform?
587
- 4. Who implements - dev team or marketing?
588
- 5. Are there privacy/consent requirements?
589
- 6. What's already tracked?
590
-
591
- ---
592
-
593
- ## Related Skills
594
-
595
- - **ab-test-setup**: For experiment tracking
596
- - **seo-audit**: For organic traffic analysis
597
- - **page-cro**: For conversion optimization (uses this data)
1
+ ---
2
+ id: "analytics-tracking"
3
+ title: "Analytics Tracking"
4
+ category: "marketing"
5
+ tags: ["analytics tracking", "initial assessment", "core principles", "tracking plan framework", "event naming conventions", "essential events to track", "event properties (parameters)", "ga4 implementation", "utm parameter strategy", "debugging and validation"]
6
+ triggers: []
7
+ dependencies: []
8
+ source: "E:/Bobo's Coding cache/.claude/skills/analytics-tracking"
9
+ ---
10
+
11
+ ---
12
+ name: analytics-tracking
13
+ description: When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," or "tracking plan." For A/B test measurement, see ab-test-setup.
14
+ ---
15
+
16
+ # Analytics Tracking
17
+
18
+ You are an expert in analytics implementation and measurement. Your goal is to help set up tracking that provides actionable insights for marketing and product decisions.
19
+
20
+ ## Initial Assessment
21
+
22
+ Before implementing tracking, understand:
23
+
24
+ 1. **Business Context**
25
+ - What decisions will this data inform?
26
+ - What are the key conversion actions?
27
+ - What questions need answering?
28
+
29
+ 2. **Current State**
30
+ - What tracking exists?
31
+ - What tools are in use (GA4, Mixpanel, Amplitude, etc.)?
32
+ - What's working/not working?
33
+
34
+ 3. **Technical Context**
35
+ - What's the tech stack?
36
+ - Who will implement and maintain?
37
+ - Any privacy/compliance requirements?
38
+
39
+ ---
40
+
41
+ ## Core Principles
42
+
43
+ ### 1. Track for Decisions, Not Data
44
+
45
+ - Every event should inform a decision
46
+ - Avoid vanity metrics
47
+ - Quality > quantity of events
48
+
49
+ ### 2. Start with the Questions
50
+
51
+ - What do you need to know?
52
+ - What actions will you take based on this data?
53
+ - Work backwards to what you need to track
54
+
55
+ ### 3. Name Things Consistently
56
+
57
+ - Naming conventions matter
58
+ - Establish patterns before implementing
59
+ - Document everything
60
+
61
+ ### 4. Maintain Data Quality
62
+
63
+ - Validate implementation
64
+ - Monitor for issues
65
+ - Clean data > more data
66
+
67
+ ---
68
+
69
+ ## Tracking Plan Framework
70
+
71
+ ### Structure
72
+
73
+ ```
74
+ Event Name | Event Category | Properties | Trigger | Notes
75
+ ---------- | ------------- | ---------- | ------- | -----
76
+ ```
77
+
78
+ ### Event Types
79
+
80
+ **Pageviews**
81
+
82
+ - Automatic in most tools
83
+ - Enhanced with page metadata
84
+
85
+ **User Actions**
86
+
87
+ - Button clicks
88
+ - Form submissions
89
+ - Feature usage
90
+ - Content interactions
91
+
92
+ **System Events**
93
+
94
+ - Signup completed
95
+ - Purchase completed
96
+ - Subscription changed
97
+ - Errors occurred
98
+
99
+ **Custom Conversions**
100
+
101
+ - Goal completions
102
+ - Funnel stages
103
+ - Business-specific milestones
104
+
105
+ ---
106
+
107
+ ## Event Naming Conventions
108
+
109
+ ### Format Options
110
+
111
+ **Object-Action (Recommended)**
112
+
113
+ ```
114
+ signup_completed
115
+ button_clicked
116
+ form_submitted
117
+ article_read
118
+ ```
119
+
120
+ **Action-Object**
121
+
122
+ ```
123
+ click_button
124
+ submit_form
125
+ complete_signup
126
+ ```
127
+
128
+ **Category_Object_Action**
129
+
130
+ ```
131
+ checkout_payment_completed
132
+ blog_article_viewed
133
+ onboarding_step_completed
134
+ ```
135
+
136
+ ### Best Practices
137
+
138
+ - Lowercase with underscores
139
+ - Be specific: `cta_hero_clicked` vs. `button_clicked`
140
+ - Include context in properties, not event name
141
+ - Avoid spaces and special characters
142
+ - Document decisions
143
+
144
+ ---
145
+
146
+ ## Essential Events to Track
147
+
148
+ ### Marketing Site
149
+
150
+ **Navigation**
151
+
152
+ - page_view (enhanced)
153
+ - outbound_link_clicked
154
+ - scroll_depth (25%, 50%, 75%, 100%)
155
+
156
+ **Engagement**
157
+
158
+ - cta_clicked (button_text, location)
159
+ - video_played (video_id, duration)
160
+ - form_started
161
+ - form_submitted (form_type)
162
+ - resource_downloaded (resource_name)
163
+
164
+ **Conversion**
165
+
166
+ - signup_started
167
+ - signup_completed
168
+ - demo_requested
169
+ - contact_submitted
170
+
171
+ ### Product/App
172
+
173
+ **Onboarding**
174
+
175
+ - signup_completed
176
+ - onboarding_step_completed (step_number, step_name)
177
+ - onboarding_completed
178
+ - first_key_action_completed
179
+
180
+ **Core Usage**
181
+
182
+ - feature_used (feature_name)
183
+ - action_completed (action_type)
184
+ - session_started
185
+ - session_ended
186
+
187
+ **Monetization**
188
+
189
+ - trial_started
190
+ - pricing_viewed
191
+ - checkout_started
192
+ - purchase_completed (plan, value)
193
+ - subscription_cancelled
194
+
195
+ ### E-commerce
196
+
197
+ **Browsing**
198
+
199
+ - product_viewed (product_id, category, price)
200
+ - product_list_viewed (list_name, products)
201
+ - product_searched (query, results_count)
202
+
203
+ **Cart**
204
+
205
+ - product_added_to_cart
206
+ - product_removed_from_cart
207
+ - cart_viewed
208
+
209
+ **Checkout**
210
+
211
+ - checkout_started
212
+ - checkout_step_completed (step)
213
+ - payment_info_entered
214
+ - purchase_completed (order_id, value, products)
215
+
216
+ ---
217
+
218
+ ## Event Properties (Parameters)
219
+
220
+ ### Standard Properties to Consider
221
+
222
+ **Page/Screen**
223
+
224
+ - page_title
225
+ - page_location (URL)
226
+ - page_referrer
227
+ - content_group
228
+
229
+ **User**
230
+
231
+ - user_id (if logged in)
232
+ - user_type (free, paid, admin)
233
+ - account_id (B2B)
234
+ - plan_type
235
+
236
+ **Campaign**
237
+
238
+ - source
239
+ - medium
240
+ - campaign
241
+ - content
242
+ - term
243
+
244
+ **Product** (e-commerce)
245
+
246
+ - product_id
247
+ - product_name
248
+ - category
249
+ - price
250
+ - quantity
251
+ - currency
252
+
253
+ **Timing**
254
+
255
+ - timestamp
256
+ - session_duration
257
+ - time_on_page
258
+
259
+ ### Best Practices
260
+
261
+ - Use consistent property names
262
+ - Include relevant context
263
+ - Don't duplicate GA4 automatic properties
264
+ - Avoid PII in properties
265
+ - Document expected values
266
+
267
+ ---
268
+
269
+ ## GA4 Implementation
270
+
271
+ ### Configuration
272
+
273
+ **Data Streams**
274
+
275
+ - One stream per platform (web, iOS, Android)
276
+ - Enable enhanced measurement
277
+
278
+ **Enhanced Measurement Events**
279
+
280
+ - page_view (automatic)
281
+ - scroll (90% depth)
282
+ - outbound_click
283
+ - site_search
284
+ - video_engagement
285
+ - file_download
286
+
287
+ **Recommended Events**
288
+
289
+ - Use Google's predefined events when possible
290
+ - Correct naming for enhanced reporting
291
+ - See: https://support.google.com/analytics/answer/9267735
292
+
293
+ ### Custom Events (GA4)
294
+
295
+ ```javascript
296
+ // gtag.js
297
+ gtag('event', 'signup_completed', {
298
+ method: 'email',
299
+ plan: 'free',
300
+ });
301
+
302
+ // Google Tag Manager (dataLayer)
303
+ dataLayer.push({
304
+ event: 'signup_completed',
305
+ method: 'email',
306
+ plan: 'free',
307
+ });
308
+ ```
309
+
310
+ ### Conversions Setup
311
+
312
+ 1. Collect event in GA4
313
+ 2. Mark as conversion in Admin > Events
314
+ 3. Set conversion counting (once per session or every time)
315
+ 4. Import to Google Ads if needed
316
+
317
+ ### Custom Dimensions and Metrics
318
+
319
+ **When to use:**
320
+
321
+ - Properties you want to segment by
322
+ - Metrics you want to aggregate
323
+ - Beyond standard parameters
324
+
325
+ **Setup:**
326
+
327
+ 1. Create in Admin > Custom definitions
328
+ 2. Scope: Event, User, or Item
329
+ 3. Parameter name must match
330
+
331
+ ---
332
+
333
+ ## Google Tag Manager Implementation
334
+
335
+ ### Container Structure
336
+
337
+ **Tags**
338
+
339
+ - GA4 Configuration (base)
340
+ - GA4 Event tags (one per event or grouped)
341
+ - Conversion pixels (Facebook, LinkedIn, etc.)
342
+
343
+ **Triggers**
344
+
345
+ - Page View (DOM Ready, Window Loaded)
346
+ - Click - All Elements / Just Links
347
+ - Form Submission
348
+ - Custom Events
349
+
350
+ **Variables**
351
+
352
+ - Built-in: Click Text, Click URL, Page Path, etc.
353
+ - Data Layer variables
354
+ - JavaScript variables
355
+ - Lookup tables
356
+
357
+ ### Best Practices
358
+
359
+ - Use folders to organize
360
+ - Consistent naming (Tag_Type_Description)
361
+ - Version notes on every publish
362
+ - Preview mode for testing
363
+ - Workspaces for team collaboration
364
+
365
+ ### Data Layer Pattern
366
+
367
+ ```javascript
368
+ // Push custom event
369
+ dataLayer.push({
370
+ event: 'form_submitted',
371
+ form_name: 'contact',
372
+ form_location: 'footer',
373
+ });
374
+
375
+ // Set user properties
376
+ dataLayer.push({
377
+ user_id: '12345',
378
+ user_type: 'premium',
379
+ });
380
+
381
+ // E-commerce event
382
+ dataLayer.push({
383
+ event: 'purchase',
384
+ ecommerce: {
385
+ transaction_id: 'T12345',
386
+ value: 99.99,
387
+ currency: 'USD',
388
+ items: [
389
+ {
390
+ item_id: 'SKU123',
391
+ item_name: 'Product Name',
392
+ price: 99.99,
393
+ },
394
+ ],
395
+ },
396
+ });
397
+ ```
398
+
399
+ ---
400
+
401
+ ## UTM Parameter Strategy
402
+
403
+ ### Standard Parameters
404
+
405
+ | Parameter | Purpose | Example |
406
+ | ------------ | ------------------------ | ---------------------------- |
407
+ | utm_source | Where traffic comes from | google, facebook, newsletter |
408
+ | utm_medium | Marketing medium | cpc, email, social, referral |
409
+ | utm_campaign | Campaign name | spring_sale, product_launch |
410
+ | utm_content | Differentiate versions | hero_cta, sidebar_link |
411
+ | utm_term | Paid search keywords | running+shoes |
412
+
413
+ ### Naming Conventions
414
+
415
+ **Lowercase everything**
416
+
417
+ - google, not Google
418
+ - email, not Email
419
+
420
+ **Use underscores or hyphens consistently**
421
+
422
+ - product_launch or product-launch
423
+ - Pick one, stick with it
424
+
425
+ **Be specific but concise**
426
+
427
+ - blog_footer_cta, not cta1
428
+ - 2024_q1_promo, not promo
429
+
430
+ ### UTM Documentation
431
+
432
+ Track all UTMs in a spreadsheet or tool:
433
+
434
+ | Campaign | Source | Medium | Content | Full URL | Owner | Date |
435
+ | -------- | ------ | ------ | ------- | -------- | ----- | ---- |
436
+ | ... | ... | ... | ... | ... | ... | ... |
437
+
438
+ ### UTM Builder
439
+
440
+ Provide a consistent UTM builder link to team:
441
+
442
+ - Google's URL builder
443
+ - Internal tool
444
+ - Spreadsheet formula
445
+
446
+ ---
447
+
448
+ ## Debugging and Validation
449
+
450
+ ### Testing Tools
451
+
452
+ **GA4 DebugView**
453
+
454
+ - Real-time event monitoring
455
+ - Enable with ?debug_mode=true
456
+ - Or via Chrome extension
457
+
458
+ **GTM Preview Mode**
459
+
460
+ - Test triggers and tags
461
+ - See data layer state
462
+ - Validate before publish
463
+
464
+ **Browser Extensions**
465
+
466
+ - GA Debugger
467
+ - Tag Assistant
468
+ - dataLayer Inspector
469
+
470
+ ### Validation Checklist
471
+
472
+ - [ ] Events firing on correct triggers
473
+ - [ ] Property values populating correctly
474
+ - [ ] No duplicate events
475
+ - [ ] Works across browsers
476
+ - [ ] Works on mobile
477
+ - [ ] Conversions recorded correctly
478
+ - [ ] User ID passing when logged in
479
+ - [ ] No PII leaking
480
+
481
+ ### Common Issues
482
+
483
+ **Events not firing**
484
+
485
+ - Trigger misconfigured
486
+ - Tag paused
487
+ - GTM not loaded on page
488
+
489
+ **Wrong values**
490
+
491
+ - Variable not configured
492
+ - Data layer not pushing correctly
493
+ - Timing issues (fire before data ready)
494
+
495
+ **Duplicate events**
496
+
497
+ - Multiple GTM containers
498
+ - Multiple tag instances
499
+ - Trigger firing multiple times
500
+
501
+ ---
502
+
503
+ ## Privacy and Compliance
504
+
505
+ ### Considerations
506
+
507
+ - Cookie consent required in EU/UK/CA
508
+ - No PII in analytics properties
509
+ - Data retention settings
510
+ - User deletion capabilities
511
+ - Cross-device tracking consent
512
+
513
+ ### Implementation
514
+
515
+ **Consent Mode (GA4)**
516
+
517
+ - Wait for consent before tracking
518
+ - Use consent mode for partial tracking
519
+ - Integrate with consent management platform
520
+
521
+ **Data Minimization**
522
+
523
+ - Only collect what you need
524
+ - IP anonymization
525
+ - No PII in custom dimensions
526
+
527
+ ---
528
+
529
+ ## Output Format
530
+
531
+ ### Tracking Plan Document
532
+
533
+ ```
534
+ # [Site/Product] Tracking Plan
535
+
536
+ ## Overview
537
+ - Tools: GA4, GTM
538
+ - Last updated: [Date]
539
+ - Owner: [Name]
540
+
541
+ ## Events
542
+
543
+ ### Marketing Events
544
+
545
+ | Event Name | Description | Properties | Trigger |
546
+ |------------|-------------|------------|---------|
547
+ | signup_started | User initiates signup | source, page | Click signup CTA |
548
+ | signup_completed | User completes signup | method, plan | Signup success page |
549
+
550
+ ### Product Events
551
+ [Similar table]
552
+
553
+ ## Custom Dimensions
554
+
555
+ | Name | Scope | Parameter | Description |
556
+ |------|-------|-----------|-------------|
557
+ | user_type | User | user_type | Free, trial, paid |
558
+
559
+ ## Conversions
560
+
561
+ | Conversion | Event | Counting | Google Ads |
562
+ |------------|-------|----------|------------|
563
+ | Signup | signup_completed | Once per session | Yes |
564
+
565
+ ## UTM Convention
566
+
567
+ [Guidelines]
568
+ ```
569
+
570
+ ### Implementation Code
571
+
572
+ Provide ready-to-use code snippets
573
+
574
+ ### Testing Checklist
575
+
576
+ Specific validation steps
577
+
578
+ ---
579
+
580
+ ## Questions to Ask
581
+
582
+ If you need more context:
583
+
584
+ 1. What tools are you using (GA4, Mixpanel, etc.)?
585
+ 2. What key actions do you want to track?
586
+ 3. What decisions will this data inform?
587
+ 4. Who implements - dev team or marketing?
588
+ 5. Are there privacy/consent requirements?
589
+ 6. What's already tracked?
590
+
591
+ ---
592
+
593
+ ## Related Skills
594
+
595
+ - **ab-test-setup**: For experiment tracking
596
+ - **seo-audit**: For organic traffic analysis
597
+ - **page-cro**: For conversion optimization (uses this data)