plugins/marketing/skills/analytics-setup/SKILL.md
Sets up Google Tag Manager and Google Analytics 4 for websites with automated browser setup via claude-in-chrome. Use when launching a new site needing tracking, migrating to GTM/GA4, adding event tracking (clicks, forms, conversions), setting up e-commerce tracking, or debugging tracking issues. Trigger phrases include "set up GTM", "configure GA4", "tracking plan", "add event tracking", "debug analytics". NOT for analyzing existing data/reports (use google-analytics MCP), keyword research (use keyword-research), or SEO optimization (use seo-optimization).
npx skillsauth add petrogurcak/skills analytics-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When to use this skill:
When NOT to use:
google-analytics MCPkeyword-researchseo-optimization| User says... | Go to... | | ---------------------------------- | ----------------------- | | "nastav GTM", "nový container" | Phase 1: GTM Setup | | "nastav GA4", "analytics property" | Phase 2: GA4 Setup | | "tracking plan", "jaké eventy" | Phase 3: Tracking Plan | | "přidej event", "track click/form" | Phase 4: Implementation | | "nefunguje tracking", "debug" | Phase 5: Debug | | "kompletní setup od nuly" | All phases sequentially |
Tento skill podporuje automatizovaný setup přes browser automation.
Když uživatel řekne "nastav GTM/GA4 pro [web]", Claude:
Prerekvizity:
Manuální kroky:
1. Jdi na tagmanager.google.com
2. "Create Account"
3. Account Name: [Název firmy]
4. Country: Czech Republic
5. Container Name: [domain.com]
6. Target Platform: Web
7. Accept Terms
Automated (claude-in-chrome):
Řekni: "Vytvoř GTM container pro example.com"
Claude provede:
1. navigate → tagmanager.google.com
2. click → Create Account
3. fill → Account name, Container name
4. select → Web platform
5. screenshot → GTM snippet
6. return → Installation code
Po vytvoření získáš dva snippety:
Head snippet (před </head>):
<!-- Google Tag Manager -->
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != "dataLayer" ? "&l=" + l : "";
j.async = true;
j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, "script", "dataLayer", "GTM-XXXXXX");
</script>
<!-- End Google Tag Manager -->
Body snippet (hned za <body>):
<!-- Google Tag Manager (noscript) -->
<noscript
><iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXX"
height="0"
width="0"
style="display:none;visibility:hidden"
></iframe
></noscript>
<!-- End Google Tag Manager (noscript) -->
| Pravidlo | Popis |
| --------------------------- | ------------------------------------------------------------ |
| 1 container per website | Nikdy nesdílej container mezi weby |
| Client owns container | Klient vlastní, ne agentura |
| Naming convention | [Typ] - [Nástroj] - [Akce] např. GA4 - Event - CTA Click |
| Use folders | Organizuj podle: Analytics, Ads, Tracking |
| Version notes | Vždy popis co změna obsahuje |
| Preview before publish | Testuj každou změnu |
📁 Analytics
├── GA4 - Config
├── GA4 - Event - Page View
└── GA4 - Event - Scroll
📁 Conversions
├── GA4 - Event - Form Submit
├── GA4 - Event - CTA Click
└── GA4 - Event - Purchase
📁 Advertising
├── Google Ads - Conversion
└── FB Pixel - Base
📁 Utilities
├── Consent Mode
└── Data Layer Push
Manuální kroky:
1. Jdi na analytics.google.com
2. Admin → Create Property
3. Property Name: [Web Name]
4. Timezone: (GMT+01:00) Prague
5. Currency: CZK
6. Business Details → vyplň
7. Create → Web stream
8. URL: https://example.com
9. Stream name: [Web Name] - Web
Automated (claude-in-chrome):
Řekni: "Vytvoř GA4 property pro example.com"
Claude provede:
1. navigate → analytics.google.com
2. click → Admin → Create Property
3. fill → Property details
4. create → Web data stream
5. screenshot → Measurement ID
6. return → G-XXXXXXXXXX
Po vytvoření získáš:
G-XXXXXXXXXXV GTM vytvoř Google Tag:
1. Tags → New
2. Tag Type: Google Tag
3. Tag ID: G-XXXXXXXXXX
4. Trigger: All Pages
5. Save & Publish
GA4 automaticky trackuje (zapni v Data Stream settings):
| Event | Popis |
| ------------------------------- | ----------------- |
| page_view | Zobrazení stránky |
| scroll | 90% scroll depth |
| click | Outbound links |
| view_search_results | Site search |
| video_start/progress/complete | YouTube embeds |
| file_download | PDF, docs, etc. |
Doporučení: Zapni vše, vypni co nepotřebuješ.
Admin → Data Settings → Data Retention
- Event data retention: 14 months (max)
- Reset on new activity: ON
Universal Events (každý web):
| Event | Trigger | Parametry |
| --------------- | ------------------ | ------------------------- |
| page_view | All pages | page_title, page_location |
| scroll | 25%, 50%, 75%, 90% | percent_scrolled |
| click | CTA buttons | link_text, link_url |
| form_submit | Form submission | form_id, form_name |
| file_download | PDF/doc click | file_name, file_extension |
E-commerce Events:
| Event | Kdy | Parametry |
| ---------------- | ----------------- | ------------------------------ |
| view_item | Product page | item_id, item_name, price |
| add_to_cart | Add to cart click | items[], value |
| begin_checkout | Checkout start | items[], value |
| purchase | Order complete | transaction_id, value, items[] |
Lead Gen Events:
| Event | Kdy | Parametry |
| --------------- | --------------------- | -------------------- |
| generate_lead | Contact form submit | form_name, lead_type |
| sign_up | Registration complete | method |
| login | User login | method |
SaaS Events:
| Event | Kdy | Parametry |
| ------------------- | ------------------ | ---------------- |
| sign_up | Trial/registration | plan_type |
| tutorial_complete | Onboarding done | step_count |
| subscription | Plan purchase | plan_name, value |
## [Web Name] Tracking Plan
### Business Goals
1. [Goal 1]
2. [Goal 2]
### Key Events (Conversions)
| Event | Description | Value |
| ------------- | --------------- | --------------- |
| purchase | Completed order | order_value |
| generate_lead | Contact form | $50 (estimated) |
### Engagement Events
| Event | Description | Trigger |
| ------------ | ---------------- | ---------------------- |
| cta_click | Main CTA clicked | Button class .cta-main |
| scroll_depth | 90% page scroll | Scroll trigger |
### Custom Dimensions
| Dimension | Scope | Values |
| ------------ | ----- | ---------------------- |
| user_type | User | free, premium |
| content_type | Event | blog, product, landing |
Google Tag (Base):
Tag Type: Google Tag
Tag ID: G-XXXXXXXXXX
Trigger: All Pages
GA4 Event Tag:
Tag Type: Google Analytics: GA4 Event
Configuration Tag: [Google Tag]
Event Name: [event_name]
Event Parameters:
- parameter_name: {{variable}}
Trigger: [Custom trigger]
Click - All CTA Buttons:
Trigger Type: Click - All Elements
Trigger fires on: Some Clicks
Conditions:
Click Classes contains "cta"
OR Click Classes contains "btn-primary"
Form Submit:
Trigger Type: Form Submission
Trigger fires on: Some Forms
Conditions:
Form ID equals "contact-form"
Scroll Depth:
Trigger Type: Scroll Depth
Vertical Scroll Depths: 25, 50, 75, 90
Percentages: checked
YouTube Video:
Trigger Type: YouTube Video
Capture: Start, Complete, Pause, Progress
Progress: 25%, 50%, 75%
Built-in Variables (Enable these):
Custom Variables:
Data Layer Variable:
Variable Type: Data Layer Variable
Data Layer Variable Name: ecommerce.value
JavaScript Variable:
Variable Type: Custom JavaScript
function() {
return document.title;
}
Lookup Table:
Variable Type: Lookup Table
Input: {{Page Path}}
/contact → Contact Page
/pricing → Pricing Page
Default: Other Page
Řekni: "Přidej GA4 event pro click na CTA button s třídou .cta-main"
Claude provede:
1. navigate → GTM container
2. create → New Trigger (Click - Some Elements)
3. configure → Click Classes contains "cta-main"
4. create → New Tag (GA4 Event)
5. configure → Event name: cta_click
6. link → Trigger to Tag
7. screenshot → Preview mode test
8. return → Confirmation + test instructions
1. V GTM klikni "Preview"
2. Zadej URL webu
3. Otevře se debug panel
4. Proveď akce na webu
5. Zkontroluj:
- Tags Fired
- Tags Not Fired
- Data Layer
- Variables
1. V GA4: Admin → DebugView
2. Na webu: Otevři s GTM Preview NEBO
3. Přidej parametr: ?debug_mode=true
4. Sleduj events v reálném čase
| Problém | Příčina | Řešení | | ------------------ | -------------------- | --------------------------- | | Tag se nespouští | Špatný trigger | Zkontroluj trigger podmínky | | Duplikátní events | Více triggerů | Zkombinuj triggery | | Chybí parametry | Variable nenastavená | Zkontroluj variable hodnotu | | GA4 neukazuje data | Consent mode | Zkontroluj consent status | | Preview nefunguje | Blocker extension | Vypni AdBlock |
V GTM:
1. Přidej Consent Mode template (např. Cookiebot, Usercentrics)
2. Nastav default consent state:
- analytics_storage: denied
- ad_storage: denied
3. Po souhlasu: granted
Google Tag s Consent:
Tag Configuration:
Consent Settings:
- Require consent for: Analytics
- Additional Consent Checks: [dle potřeby]
[Platform] - [Type] - [Description]
GA4 - Config - Base Tag
GA4 - Event - CTA Click
GA4 - Event - Form Submit
GAds - Conversion - Purchase
FB - Event - Lead
[Type] - [Description]
Click - CTA Buttons
Form - Contact Submit
Scroll - 90 Percent
Page View - Thank You Page
[Type] - [Description]
DLV - Transaction ID
JS - Page Category
Const - GA4 Measurement ID
LT - Page Type Lookup
[ ] GTM
[ ] GA4
[ ] Integration
[ ] Basic Events
| Téma | URL | | ---------------------- | ------------------------------------------------------------------------------------------------------ | | GTM Guide | support.google.com/tagmanager/answer/12811173 | | GTM Setup | support.google.com/tagmanager/answer/14842164 | | Google Tag in GTM | support.google.com/tagmanager/answer/15756616 | | GA4 Events | support.google.com/analytics/answer/9322688 | | GA4 Recommended Events | support.google.com/analytics/answer/9267735 | | GA4 Ecommerce | support.google.com/analytics/answer/12200568 | | Events in GTM | support.google.com/tagmanager/answer/13034206 |
keyword-research pro SEO strategiiseo-optimization pro on-page SEOgoogle-analytics MCP pro čtení datdevelopment
Builds a pre-launch social proof strategy through structured beta programs using D'Souza Brain Audit interviews. Use when launching new products/services and need compelling testimonials, planning a beta cohort, designing interview questions to harvest objection-busting social proof, improving video testimonials for landing pages, or designing case studies with metrics. Trigger phrases include "beta tester program for testimonials", "pre-launch social proof", "Brain Audit testimonial framework", "case study harvest", "reverse testimonial", "video testimonial mechanics", "social proof landing page", "sběr referencí", "beta tester program", "testimonial pro landing page", "social proof před launchem", "rozhovor s klientem", "case study sběr", "reference před spuštěním". NOT for ongoing case study production (use growth-hacking case-study approach), offer design (use offer-creation), or conversion optimization (use ux-optimization).
development
Use when planning a product launch and the product type is unclear or could be either generic (SaaS/app/physical) or info-product. Routes between marketing:launch-strategy (generic launches) and marketing:info-product-launch (courses, memberships, ebooks, cohorts, communities). Trigger phrases - "launch", "spuštění", "go-to-market", "product launch", "release strategy", "uvedení na trh", "launch plan", "spuštění produktu", "launch sequence", "launch strategy". Do NOT trigger when product type is already clear (use specific skill directly).
testing
Specialized 8-week launch cadence for info-products — online courses, cohort programs, memberships, communities, ebooks, masterminds. Combines Jeff Walker's Product Launch Formula (Seed/Internal/JV variants, PLC sequence, open-cart day-by-day) with Stu McLaren's membership mechanics (closed cart, Success Path) and Hormozi Grand Slam Offer stacking. Use when planning "launch online kurzu", "info-product launch", "PLF launch", "course launch", "membership launch", "cohort launch", "ebook launch", "open cart close cart", "8-week launch of online course", "beta cohort to launch sequence", "spuštění kurzu", "launch členské sekce", "open cart strategie". Differentiates from marketing:launch-strategy (generic SaaS/app launches) — info-product-specific. NOT for SaaS launches, physical products, or services.
development
Use when releasing an Expo/React Native mobile app to App Store and Google Play - covers eas submit, ASC "Submit for Review", Play promote Internal→Production, OTA update, and decoding common silent failures (Apple agreement expiry, missing English locale, Background Location declaration, web bundle failure on react-native-maps).