@friedbotstudio/create-baseline 0.5.0 → 0.7.0

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 (55) hide show
  1. package/README.md +14 -10
  2. package/bin/cli.js +46 -15
  3. package/obj/template/.claude/commands/init-project-doctor.md +74 -0
  4. package/obj/template/.claude/hooks/lib/resume_writer.py +14 -1
  5. package/obj/template/.claude/hooks/track_guard.sh +11 -1
  6. package/obj/template/.claude/manifest.json +848 -230
  7. package/obj/template/.claude/schemas/workflow-track.v1.json +64 -0
  8. package/obj/template/.claude/skills/audit-baseline/audit.sh +6 -3
  9. package/obj/template/.claude/skills/chore/SKILL.md +2 -2
  10. package/obj/template/.claude/skills/harness/SKILL.md +15 -6
  11. package/obj/template/.claude/skills/intake/SKILL.md +1 -1
  12. package/obj/template/.claude/skills/swarm-plan/SKILL.md +2 -0
  13. package/obj/template/.claude/skills/tdd/SKILL.md +2 -2
  14. package/obj/template/.claude/skills/triage/SKILL.md +29 -6
  15. package/obj/template/.claude/skills/triage/seed-tasklist.mjs +107 -0
  16. package/obj/template/.claude/skills/upgrade-project/SKILL.md +121 -0
  17. package/obj/template/.claude/workflows.jsonl +6 -0
  18. package/obj/template/CLAUDE.md +14 -19
  19. package/obj/template/docs/init/seed.md +152 -7
  20. package/package.json +1 -1
  21. package/src/.claude/workflows.template.jsonl +6 -0
  22. package/src/CLAUDE.template.md +14 -19
  23. package/src/cli/diff-render.js +54 -0
  24. package/src/cli/install.js +38 -3
  25. package/src/cli/manifest.js +7 -3
  26. package/src/cli/merge.js +107 -13
  27. package/src/cli/track-tasklist-materializer.js +223 -0
  28. package/src/cli/tui/upgrade.js +130 -27
  29. package/src/cli/upgrade-tiers.js +256 -0
  30. package/src/cli/workflow-migrator.js +40 -0
  31. package/src/cli/workflows-validator-invariants.js +417 -0
  32. package/src/cli/workflows-validator-predicates.js +19 -0
  33. package/src/cli/workflows-validator.js +156 -0
  34. package/src/seed.template.md +152 -7
  35. package/obj/template/.claude/skills/google-analytics/SKILL.md +0 -129
  36. package/obj/template/.claude/skills/google-analytics/references/audiences.md +0 -389
  37. package/obj/template/.claude/skills/google-analytics/references/bigquery.md +0 -470
  38. package/obj/template/.claude/skills/google-analytics/references/custom-dimensions.md +0 -355
  39. package/obj/template/.claude/skills/google-analytics/references/custom-events.md +0 -383
  40. package/obj/template/.claude/skills/google-analytics/references/data-management.md +0 -416
  41. package/obj/template/.claude/skills/google-analytics/references/debugview.md +0 -364
  42. package/obj/template/.claude/skills/google-analytics/references/events-fundamentals.md +0 -398
  43. package/obj/template/.claude/skills/google-analytics/references/gtag.md +0 -502
  44. package/obj/template/.claude/skills/google-analytics/references/gtm-integration.md +0 -483
  45. package/obj/template/.claude/skills/google-analytics/references/measurement-protocol.md +0 -519
  46. package/obj/template/.claude/skills/google-analytics/references/privacy.md +0 -441
  47. package/obj/template/.claude/skills/google-analytics/references/recommended-events.md +0 -464
  48. package/obj/template/.claude/skills/google-analytics/references/reporting.md +0 -397
  49. package/obj/template/.claude/skills/google-analytics/references/setup.md +0 -344
  50. package/obj/template/.claude/skills/google-analytics/references/user-tracking.md +0 -417
  51. package/obj/template/.claude/skills/optimize-seo/SKILL.md +0 -313
  52. package/obj/template/.claude/skills/optimize-seo/scripts/pagespeed.mjs +0 -197
  53. package/obj/template/.claude/skills/pagespeed-insights/LICENSE.md +0 -37
  54. package/obj/template/.claude/skills/pagespeed-insights/SKILL.md +0 -446
  55. package/obj/template/.claude/skills/pagespeed-insights/reference.md +0 -50
@@ -1,344 +0,0 @@
1
- # GA4 Property Setup and Installation
2
-
3
- Complete guide for creating Google Analytics 4 accounts, properties, data streams, and installing tracking code.
4
-
5
- ## Overview
6
-
7
- Setting up Google Analytics 4 requires creating an account hierarchy, configuring data streams, and installing tracking code. This reference provides step-by-step guidance for all GA4 setup methods from initial property creation through implementation verification.
8
-
9
- ## Account Hierarchy
10
-
11
- GA4 uses a three-level hierarchy:
12
-
13
- ```
14
- Google Account (Login credentials)
15
- └── Analytics Account (Container for properties)
16
- └── GA4 Property (Analytics container for website/app)
17
- └── Data Stream (Platform-specific: Web, iOS, Android)
18
- └── Events and Parameters
19
- ```
20
-
21
- ### Level Definitions
22
-
23
- | Level | Purpose | Limit |
24
- |-------|---------|-------|
25
- | Analytics Account | Organisation container | 2,000 properties |
26
- | GA4 Property | Website/app container | 1,000 data streams |
27
- | Data Stream | Platform-specific tracking | Unique Measurement ID |
28
-
29
- ## Creating a GA4 Property
30
-
31
- ### Step 1: Navigate to Analytics
32
-
33
- 1. Go to analytics.google.com
34
- 2. Sign in with Google account
35
- 3. Click Admin (bottom-left)
36
- 4. Click "Create" -> "Property"
37
-
38
- ### Step 2: Configure Property Details
39
-
40
- **Property Name:**
41
- - Use descriptive name: "Main Website", "E-commerce Site"
42
- - Include environment if needed: "Production Website"
43
-
44
- **Reporting Time Zone:**
45
- - Select primary business timezone
46
- - Affects day boundaries in reports
47
- - Cannot be changed retroactively
48
-
49
- **Currency:**
50
- - Select reporting currency (USD, EUR, GBP, AUD)
51
- - All monetary values converted to this currency
52
-
53
- ### Step 3: Business Information
54
-
55
- **Industry Category:**
56
- - Select relevant industry
57
- - Influences default reports and benchmarks
58
-
59
- **Business Objectives:**
60
- - Get baseline reports (recommended for beginners)
61
- - Examine user behaviour
62
- - Measure customer actions
63
- - Get insights on customers
64
- - Improve marketing ROI
65
-
66
- ### Step 4: Accept Terms
67
-
68
- - Google Analytics Terms of Service
69
- - Data Processing Amendment (GDPR)
70
- - Click "Create"
71
-
72
- ## Data Stream Configuration
73
-
74
- ### Web Data Stream
75
-
76
- **Creating the Stream:**
77
-
78
- 1. Admin -> Data Streams
79
- 2. Click "Add Stream"
80
- 3. Select "Web"
81
- 4. Enter website URL (example.com, not https://www.example.com)
82
- 5. Enter stream name ("Main Website")
83
- 6. Enable Enhanced Measurement (recommended)
84
- 7. Click "Create stream"
85
-
86
- **Enhanced Measurement Events:**
87
-
88
- | Event | Trigger | Toggle |
89
- |-------|---------|--------|
90
- | page_view | Page loads | Always on |
91
- | scroll | 90% vertical scroll | Optional |
92
- | click | Outbound link clicks | Optional |
93
- | view_search_results | Site search | Optional |
94
- | video_start/progress/complete | YouTube engagement | Optional |
95
- | file_download | PDF, DOC, ZIP clicks | Optional |
96
- | form_start/form_submit | Form interactions | Optional |
97
-
98
- **Measurement ID:**
99
- - Format: G-XXXXXXXXXX
100
- - Location: Data Streams -> Click stream -> Top section
101
- - Copy for installation
102
-
103
- ### iOS Data Stream
104
-
105
- **Prerequisites:**
106
- - Apple Developer account
107
- - iOS app in development/published
108
- - Firebase project (auto-created)
109
-
110
- **Setup:**
111
-
112
- 1. Admin -> Data Streams -> Add Stream -> iOS app
113
- 2. Enter Bundle ID (com.company.appname)
114
- 3. Enter App Store ID (optional)
115
- 4. Click "Register app"
116
- 5. Download GoogleService-Info.plist
117
- 6. Add to Xcode project
118
-
119
- **Firebase SDK Installation:**
120
-
121
- ```ruby
122
- # Podfile
123
- pod 'Firebase/Analytics'
124
- ```
125
-
126
- ```swift
127
- // AppDelegate.swift
128
- import Firebase
129
-
130
- func application(_ application: UIApplication,
131
- didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
132
- FirebaseApp.configure()
133
- return true
134
- }
135
- ```
136
-
137
- ### Android Data Stream
138
-
139
- **Prerequisites:**
140
- - Android Studio
141
- - Android app package name
142
-
143
- **Setup:**
144
-
145
- 1. Admin -> Data Streams -> Add Stream -> Android app
146
- 2. Enter package name (com.company.appname)
147
- 3. Click "Register app"
148
- 4. Download google-services.json
149
- 5. Place in app/ directory
150
-
151
- **Firebase SDK Installation:**
152
-
153
- ```gradle
154
- // Project build.gradle
155
- buildscript {
156
- dependencies {
157
- classpath 'com.google.gms:google-services:4.3.15'
158
- }
159
- }
160
-
161
- // App build.gradle
162
- plugins {
163
- id 'com.google.gms.google-services'
164
- }
165
-
166
- dependencies {
167
- implementation platform('com.google.firebase:firebase-bom:32.0.0')
168
- implementation 'com.google.firebase:firebase-analytics'
169
- }
170
- ```
171
-
172
- ## Installation Methods
173
-
174
- ### Method 1: CMS Plugin (Easiest)
175
-
176
- **WordPress - Site Kit by Google:**
177
-
178
- 1. Plugins -> Add New -> Search "Site Kit by Google"
179
- 2. Install and Activate
180
- 3. Site Kit -> Start Setup
181
- 4. Connect Google account
182
- 5. Select or create GA4 property
183
- 6. Activate Analytics module
184
-
185
- **Shopify:**
186
-
187
- 1. Settings -> Customer events
188
- 2. Add custom pixel -> Google Analytics 4
189
- 3. Enter Measurement ID
190
- 4. Save
191
-
192
- **Wix:**
193
-
194
- 1. Settings -> Marketing & SEO -> Marketing Integrations
195
- 2. Google Analytics -> Connect
196
- 3. Sign in and select GA4 property
197
-
198
- ### Method 2: gtag.js Direct
199
-
200
- Place in `<head>` section before other scripts:
201
-
202
- ```html
203
- <!-- Google tag (gtag.js) -->
204
- <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
205
- <script>
206
- window.dataLayer = window.dataLayer || [];
207
- function gtag(){dataLayer.push(arguments);}
208
- gtag('js', new Date());
209
- gtag('config', 'G-XXXXXXXXXX');
210
- </script>
211
- ```
212
-
213
- ### Method 3: Google Tag Manager (Recommended)
214
-
215
- **Step 1: Install GTM Container**
216
-
217
- Head snippet (after `<head>`):
218
- ```html
219
- <!-- Google Tag Manager -->
220
- <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
221
- new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
222
- j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
223
- 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
224
- })(window,document,'script','dataLayer','GTM-XXXXXXX');</script>
225
- <!-- End Google Tag Manager -->
226
- ```
227
-
228
- Body snippet (after `<body>`):
229
- ```html
230
- <!-- Google Tag Manager (noscript) -->
231
- <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
232
- height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
233
- <!-- End Google Tag Manager (noscript) -->
234
- ```
235
-
236
- **Step 2: Create GA4 Configuration Tag**
237
-
238
- 1. GTM -> Tags -> New
239
- 2. Tag Type: Google Tag
240
- 3. Tag ID: G-XXXXXXXXXX
241
- 4. Trigger: Initialisation - All Pages
242
- 5. Save and Publish
243
-
244
- ## Installation Verification
245
-
246
- ### Immediate Verification (0-5 minutes)
247
-
248
- 1. **Enable Debug Mode:**
249
- - Install Google Analytics Debugger Chrome extension
250
- - Enable extension (icon turns blue)
251
- - Visit website
252
-
253
- 2. **Check DebugView:**
254
- - GA4 -> Admin -> DebugView
255
- - Select device from dropdown
256
- - Confirm events appearing
257
-
258
- 3. **Expected Events:**
259
- - session_start
260
- - first_visit (new users)
261
- - page_view
262
-
263
- ### Realtime Verification (5-30 minutes)
264
-
265
- 1. Reports -> Realtime
266
- 2. Confirm active users showing
267
- 3. Verify events by name
268
- 4. Check user location on map
269
-
270
- ### Standard Reports (24-48 hours)
271
-
272
- Standard reports have processing delay:
273
- - Reports -> Acquisition -> User acquisition
274
- - Reports -> Engagement -> Events
275
- - Reports -> Engagement -> Pages and screens
276
-
277
- ## Post-Setup Configuration
278
-
279
- ### Data Retention
280
-
281
- **Location:** Admin -> Data Settings -> Data Retention
282
-
283
- | Option | Use Case |
284
- |--------|----------|
285
- | 2 months | Privacy-focused, GDPR |
286
- | 14 months | Year-over-year analysis |
287
-
288
- **Reset on New Activity:** ON (recommended) - timer resets when user returns
289
-
290
- ### Internal Traffic Filter
291
-
292
- **Location:** Admin -> Data Settings -> Data Filters
293
-
294
- 1. Create Filter -> Internal Traffic
295
- 2. Enter office IP addresses
296
- 3. Set to "Testing" first
297
- 4. Verify in DebugView (traffic_type = internal)
298
- 5. Set to "Active"
299
-
300
- ### Google Signals
301
-
302
- **Location:** Admin -> Data Settings -> Data Collection
303
-
304
- - Enables demographics (age, gender)
305
- - Enables cross-device tracking
306
- - Requires user consent for personalised ads
307
-
308
- ## Common Issues
309
-
310
- ### No Data Appearing
311
-
312
- - Verify Measurement ID is correct
313
- - Check code placement in `<head>`
314
- - Disable ad blockers for testing
315
- - Wait 24-48 hours for standard reports
316
-
317
- ### Data Only in DebugView
318
-
319
- - Remove debug_mode: true from production
320
- - Disable Google Analytics Debugger extension
321
- - Check for internal traffic filters
322
-
323
- ### Duplicate Events
324
-
325
- - Remove duplicate tracking implementations
326
- - Choose one method: gtag.js OR GTM OR plugin
327
- - Check for multiple Measurement IDs
328
-
329
- ### Wrong Timezone
330
-
331
- - Cannot change retroactively
332
- - Affects only future data
333
- - Consider creating new property if critical
334
-
335
- ## Next Steps
336
-
337
- After completing setup:
338
-
339
- 1. Configure Enhanced Measurement events
340
- 2. Set up internal traffic filters
341
- 3. Create first custom events
342
- 4. Register custom dimensions
343
- 5. Link Google Ads (if applicable)
344
- 6. Set up BigQuery export (for advanced analysis)