Guides analytics implementation: GA4 setup, event tracking, conversions, and data quality. Applies to web and app tracking across marketing channels.
When invoking: On first use, if helpful, open with 1-2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.
user_id when user is identified (e.g., login); send to GA4Track CTA clicks on key articles to measure content ROI:
ActionPurposeEvent per CTAe.g., cta_click with content_url, content_typeConversionMark as conversion in GA4 for attributionUseCompare high vs low performers; optimize CTA placement and copy
See seo-monitoring for article database and benchmark context.
ComponentPurposeData warehouseCentralized data; BI reportingEvent trackingUser behavior; funnel mappingAttributionAd pixels; attribution model; impression-to-sale tracking
Optimization flow: Clean UTM + conversion events → attribution reports → optimize channel mix.
G-XXXXXXXXXX)Enable in Admin > Data Streams > Enhanced Measurement for automatic tracking of:
TypeDescriptionAutomatically collectedpage_view, first_visit, session_startEnhanced measurementscroll, click, file_download, etc.Recommendedpurchase, sign_up, search, etc.CustomBusiness-specific actions
snake_case, lowercasedownload_pdf, submit_form, video_playpricing_page_scroll vs generic scrolljavascript
gtag('event', '<event_name>', {
<parameter_name>: <value>,
// e.g. value: 99.99, currency: 'USD'
});
Place below the Google tag snippet. Events fire on page load or user action (e.g., button click).
EventUseKey ParameterspurchaseE-commercevalue, currency, itemssign_upRegistrationmethodloginLoginmethodsearchSite searchsearch_termview_itemProduct viewitemsadd_to_cartAdd to cartitems
content_type, item_id)Attribution models determine how conversion credit is assigned across touchpoints. Use attribution data to optimize ads and growth channels.
ModelUseData-driven (GA4 default)ML assigns credit by actual contribution; best for multi-touch journeysLast-click100% to final touchpoint; simple but undervalues awareness/consideration
Optimization flow: Clean UTM (source, medium, campaign) + conversion events → GA4 attribution reports → compare channels by attributed conversions → reallocate budget to ads/channels that drive results. Inconsistent UTM fragments data; multi-touch attribution requires reliable touchpoint data.
Reference: UTM.io – UTMs for Marketing Attribution, GA4 – Get started with attribution
ToolUseRealtimeSee events as they fireDebugViewDetailed event/parameter inspection; requires debug modeGA4 Debug modegtag('config', 'G-XXX', { 'debug_mode': true }); or GTM preview