
name: analyticsdescription: 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,” tracking…risk: criticalsource: https://github.com/coreyhaines31/marketingskills/tree/main/skills/analyticssource_repo: coreyhaines31/marketingskillssource_type: communitydate_added: 2026-07-01license: MITlicense_source: https://github.com/coreyhaines31/marketingskills/blob/main/LICENSE分析跟蹤何時使用當用戶需要設(shè)置、改進或?qū)徲嫹治龈櫤蜏y量時使用此技能。當用戶提到“設(shè)置跟蹤”、“GA4”、“Google Analytics”、“轉(zhuǎn)化跟蹤”、“事件跟蹤”、“UTM 參數(shù)”、“標簽管理器”、“GTM”、“分析實施”、“跟蹤”等時也使用此技能。您是分析實施和測量方面的專家。您的目標是幫助建立跟蹤系統(tǒng)以提供對營銷和產(chǎn)品決策有可操作的洞察。初步評估首先檢查產(chǎn)品營銷上下文如果.agents/product-marketing.md存在或者.claude/product-marketing.md或者在舊版本中使用的舊文件名product-marketing-context.md在提問前請先閱讀它。使用該上下文只詢問未涵蓋的信息或與此任務特定相關(guān)的信息。在實施跟蹤之前請了解業(yè)務背景- 這些數(shù)據(jù)將為哪些決策提供依據(jù)關(guān)鍵轉(zhuǎn)化指標是什么當前狀態(tài)- 存在哪些跟蹤使用了哪些工具技術(shù)背景- 技術(shù)棧是什么有沒有隱私/合規(guī)要求核心原則1. 關(guān)注決策而不是數(shù)據(jù)每一個事件都應該影響決策避免虛榮指標事件的質(zhì)量比數(shù)量更重要2. 從問題開始你需要知道什么你會根據(jù)這些數(shù)據(jù)采取什么行動倒推到你需要跟蹤的內(nèi)容3. 一致地命名事物命名規(guī)范很重要在實施之前建立模式記錄一切4. 維護數(shù)據(jù)質(zhì)量驗證實現(xiàn)監(jiān)控問題干凈的數(shù)據(jù)比更多的數(shù)據(jù)更重要跟蹤計劃框架結(jié)構(gòu)Event Name | Category | Properties | Trigger | Notes ---------- | -------- | ---------- | ------- | -----事件類型TypeExamplesPageviewsAutomatic, enhanced with metadataUser ActionsButton clicks, form submissions, feature usageSystem EventsSignup completed, purchase, subscription changedCustom ConversionsGoal completions, funnel stages有關(guān)完整活動列表請參見 references/event-library.md事件命名規(guī)范推薦格式對象-動作signup_completed button_clicked form_submitted article_read checkout_payment_completed最佳實踐小寫字母加下劃線具體說明cta_hero_clicked與button_clicked將上下文包含在屬性中而不是事件名稱中避免空格和特殊字符記錄決策重要事件營銷網(wǎng)站EventPropertiescta_clickedbutton_text, locationform_submittedform_typesignup_completedmethod, sourcedemo_requested-產(chǎn)品/應用EventPropertiesonboarding_step_completedstep_number, step_namefeature_usedfeature_namepurchase_completedplan, valuesubscription_cancelledreason按業(yè)務類型查看完整事件庫請參閱 references/event-library.md事件屬性標準屬性CategoryPropertiesPagepage_title, page_location, page_referrerUseruser_id, user_type, account_id, plan_typeCampaignsource, medium, campaign, content, termProductproduct_id, product_name, category, price最佳實踐使用一致的屬性名稱包括相關(guān)背景不要重復自動屬性在屬性中避免使用個人身份信息GA4 實施快速設(shè)置創(chuàng)建 GA4 資產(chǎn)和數(shù)據(jù)流安裝 gtag.js 或 GTM啟用增強測量配置自定義事件在管理中標記轉(zhuǎn)換自定義事件示例gtag(event,signup_completed,{method:email,plan:free});有關(guān)詳細的 GA4 實施請參閱 references/ga4-implementation.md谷歌標簽管理器容器結(jié)構(gòu)ComponentPurposeTagsCode that executes (GA4, pixels)TriggersWhen tags fire (page view, click)VariablesDynamic values (click text, data layer)數(shù)據(jù)層模式dataLayer.push({event:form_submitted,form_name:contact,form_location:footer});有關(guān)詳細的 GTM 實施請參閱 references/gtm-implementation.mdUTM 參數(shù)策略標準參數(shù)ParameterPurposeExampleutm_sourceTraffic sourcegoogle, newsletterutm_mediumMarketing mediumcpc, email, socialutm_campaignCampaign namespring_saleutm_contentDifferentiate versionshero_ctautm_termPaid search keywordsrunningshoes命名規(guī)范把所有字母改為小寫始終一致地使用下劃線或連字符具體但簡明使用blog_footer_cta而不是cta1在電子表格中記錄所有 UTM調(diào)試與驗證測試工具ToolUse ForGA4 DebugViewReal-time event monitoringGTM Preview ModeTest triggers before publishBrowser ExtensionsTag Assistant, dataLayer Inspector驗證清單事件在正確的觸發(fā)器上觸發(fā)屬性值正確填充沒有重復事件在各瀏覽器和移動設(shè)備上均可使用轉(zhuǎn)換記錄正確無個人身份信息泄露常見問題IssueCheckEvents not firingTrigger config, GTM loadedWrong valuesVariable path, data layer structureDuplicate eventsMultiple containers, trigger firing twice隱私與合規(guī)考慮因素在歐盟/英國/加拿大需要Cookie同意分析屬性中沒有個人身份信息數(shù)據(jù)保留設(shè)置用戶刪除功能實施使用同意模式等待同意IP 匿名化只收集你需要的與同意管理平臺集成輸出格式跟蹤計劃文檔# [Site/Product] Tracking Plan ## Overview - Tools: GA4, GTM - Last updated: [Date] ## Events | Event Name | Description | Properties | Trigger | |------------|-------------|------------|---------| | signup_completed | User completes signup | method, plan | Success page | ## Custom Dimensions | Name | Scope | Parameter | |------|-------|-----------| | user_type | User | user_type | ## Conversions | Conversion | Event | Counting | |------------|-------|----------| | Signup | signup_completed | Once per session |特定任務問題你正在使用哪些工具GA4、Mixpanel 等你想跟蹤哪些關(guān)鍵操作這些數(shù)據(jù)將為哪些決策提供參考由誰來實施——開發(fā)團隊還是市場團隊是否有隱私/同意的要求已經(jīng)追蹤了什么工具集成有關(guān)實現(xiàn)請參見 工具注冊表。主要分析工具ToolBest ForMCPGuideGA4Web analytics, Google ecosystem?ga4.mdMixpanelProduct analytics, event tracking-mixpanel.mdAmplitudeProduct analytics, cohort analysis-amplitude.mdPostHogOpen-source analytics, session replay-posthog.mdSegmentCustomer data platform, routing-segment.md相關(guān)技能AB測試用于實驗跟蹤SEO 審計用于有機流量分析cro用于轉(zhuǎn)化優(yōu)化使用此數(shù)據(jù)revops用于管道指標、CRM跟蹤和收入歸因限制僅當任務明確符合其上游來源和本地項目環(huán)境時才使用此技能。在應用更改之前驗證命令、生成的代碼、依賴項、憑證和外部服務的行為。不要將示例視為環(huán)境特定測試、安全審查或用戶對破壞性或高成本操作的批準的替代。