ignitionstack.pro v1.0 is out! Read the announcement →
Skip to Content

📊 Google Analytics Events Documentation

Complete documentation for every Google Analytics 4 tracking event implemented on the site.

📋 Table of Contents

  1. Overview
  2. Naming Conventions
  3. Standard Parameters
  4. Events by Page
  5. How to Use
  6. Debugging

🎯 Overview

All tracking events are centralized in:

src/app/lib/analytics-events.ts

This system guarantees:


📝 Naming Conventions

Event Format

[section]_[component]_[action]

Examples:

Parameter Format

snake_case for every parameter

Examples:


🔑 Standard Parameters

All events include these required parameters:

ParameterTypeDescriptionExample
localestringPage locale"pt", "en", "es"
page_pathstringURL path"/pt/blog"
page_titlestringPage title"Blog - ignitionstack.pro"
funnel_stagestringFunnel stage"awareness", "consideration", "conversion", "loyalty"
source_componentstringSource component"hero_section", "blog_list"
engagement_typestringInteraction type"click", "impression", "form", "tab_change"

📄 Events by Page

Landing Page

1. Hero Section

Event: hero_cta_click

Fires when the user clicks a hero CTA

Additional parameters:

ParameterTypeDescriptionExample
destinationstringDestination URL"/pt#projects"
cta_typestringCTA type"primary", "secondary"

Track when:


2. Navigation / Header

Event: nav_item_click

Fires when the user clicks a menu item

Additional parameters:

ParameterTypeDescriptionExample
nav_itemstringMenu item"nav_about", "nav_projects"
destinationstringDestination URL"/pt#about"

Track when:


3. Projects Section

Event: project_card_click

Fires when the user clicks a project card

Additional parameters:

ParameterTypeDescriptionExample
project_idstringProject ID"firechat"
project_namestringProject name"FireChat"
destinationstringURL de destino"/pt/projetos/firechat"

Event: project_tab_change

Fires when the user changes a project tab

Additional parameters:

ParameterTypeDescriptionExample
tab_namestringTab name"frontend", "fullstack", "mobile"

Event: footer_link_click

Fires when the user clicks a footer link

Additional parameters:

ParameterTypeDescriptionExample
link_categorystringLink category"navigation", "legal"
link_labelstringLink label"Blog", "Privacidade"
destinationstringURL de destino"/pt/blog"

Event: footer_social_click

Fires when the user clicks a social icon

Additional parameters:

ParameterTypeDescriptionExample
social_platformstringSocial platform"github", "linkedin", "twitter"
destinationstringURL de destino"https://github.com/..."

Blog

1. Blog List Page

Event: blog_post_card_click

Fires when the user clicks a blog post card

Additional parameters:

ParameterTypeDescriptionExample
post_idstringPost ID"next-js-performance"
post_titlestringPost title"Como otimizar Next.js"
post_categorystringCategory"frontend", "backend"

Event: blog_filter_change

Fires when the user changes a filter

Additional parameters:

ParameterTypeDescriptionExample
filter_typestringFilter type"category", "search"
filter_valuestringFilter value"frontend", "next.js"

Event: blog_search

Fires when the user performs a search

Additional parameters:

ParameterTypeDescriptionExample
search_querystringSearch term"react hooks"
results_countnumberNumber of results5

2. Blog Post Page

Event: blog_post_reaction

Fires when the user adds a reaction

Additional parameters:

ParameterTypeDescriptionExample
post_idstringPost ID"next-js-performance"
reaction_typestringReaction type"like", "love", "fire", "clap", "mind_blown"

Event: blog_post_share

Fires when the user shares a post

Additional parameters:

ParameterTypeDescriptionExample
post_idstringPost ID"next-js-performance"
share_platformstringPlatform"twitter", "linkedin", "whatsapp", "copy_link"

Event: blog_reading_progress

Fires at reading milestones (25%, 50%, 75%, 100%)

Additional parameters:

ParameterTypeDescriptionExample
post_idstringPost ID"next-js-performance"
progress_percentagenumberProgress percentage25, 50, 75, 100

Insights

1. Insights List Page

Event: insight_card_click

Fires when the user clicks an insight card

Additional parameters:

ParameterTypeDescriptionExample
insight_idstringInsight ID"arquitectura-microservices"
insight_titlestringTitle"Microservices Guide"
insight_categorystringCategory"architecture"

2. Insight Detail Page

Event: insight_lead_magnet_view

Fires when a lead magnet is displayed

Additional parameters:

ParameterTypeDescriptionExample
insight_idstringInsight ID"arquitectura-microservices"
lead_magnet_titlestringMaterial title"Microservices eBook"

Event: insight_lead_magnet_download

Fires when the user downloads the material

Additional parameters:

ParameterTypeDescriptionExample
insight_idstringInsight ID"arquitectura-microservices"
lead_magnet_titlestringMaterial title"Microservices eBook"
email_capturedbooleanEmail capturedtrue, false

Event: insight_newsletter_subscribe

Fires when the user subscribes to the newsletter

Additional parameters:

ParameterTypeDescriptionExample
sourcestringSignup source"modal", "inline"

Store

1. Store List Page

Event: store_template_view

Fires when a template is displayed (impression)

Additional parameters:

ParameterTypeDescriptionExample
template_idstringTemplate ID"saas-dashboard"
template_namestringTemplate name"SaaS Dashboard Pro"
price_typestringPrice type"free", "one-time", "subscription"

Event: store_template_demo_click

Fires when the user clicks “View Demo”

Additional parameters:

ParameterTypeDescriptionExample
template_idstringTemplate ID"saas-dashboard"
template_namestringTemplate name"SaaS Dashboard Pro"

2. Purchase Flow

Event: store_initiate_checkout

Fires when the user starts a checkout

Additional parameters:

ParameterTypeDescriptionExample
template_idstringTemplate ID"saas-dashboard"
template_namestringTemplate name"SaaS Dashboard Pro"
pricenumberPrice199.90
price_typestringPrice type"one-time", "subscription"
currencystringCurrency"BRL"

Event: purchase (GA4 standard e-commerce)

Fires when a purchase is completed

Additional parameters:

ParameterTypeDescriptionExample
template_idstringTemplate ID"saas-dashboard"
template_namestringTemplate name"SaaS Dashboard Pro"
pricenumberPrice199.90
price_typestringPrice type"one-time"
currencystringCurrency"BRL"
transaction_idstringTransaction ID"ch_xxx"

Event: store_template_download

Fires when a free template is downloaded

Additional parameters:

ParameterTypeDescriptionExample
template_idstringTemplate ID"landing-page-free"
template_namestringTemplate name"Landing Page Basic"

Contact

Event: contact_form_start

Fires when the user starts filling out the form

Additional parameters:

ParameterTypeDescriptionExample
form_idstringForm ID"contact_main"

Event: contact_form_submit

Fires when the form is submitted

Additional parameters:

ParameterTypeDescriptionExample
form_idstringForm ID"contact_main"
form_subjectstringSelected subject"project", "mentoring"
successbooleanSuccessful submissiontrue, false

Event: contact_form_error

Fires when the form has an error

Additional parameters:

ParameterTypeDescriptionExample
form_idstringForm ID"contact_main"
error_typestringError type"validation", "network"
error_fieldstringField with error"email", "message"

Projects

Event: projects_card_click

Fires when the user clicks a project

Additional parameters:

ParameterTypeDescriptionExample
project_idstringProject ID"firechat"
project_namestringProject name"FireChat"
project_categorystringCategory"frontend", "fullstack"

Event: projects_github_cta_click

Fires when the user clicks “View on GitHub”

Additional parameters:

ParameterTypeDescriptionExample
project_idstringProject ID"firechat"
project_namestringProject name"FireChat"
destinationstringGitHub URL"https://github.com/..."

Event: projects_live_demo_click

Fires when the user clicks “View Demo”

Additional parameters:

ParameterTypeDescriptionExample
project_idstringProject ID"firechat"
project_namestringProject name"FireChat"
destinationstringDemo URL"https://demo.firechat.com"

Affiliate Events

All affiliate-specific tracking helpers live inside the affiliateEvents export of src/app/lib/analytics-events.ts. They power the landing page, referral tracker, dashboard, and checkout instrumentation.

EventFires whenKey parameters
affiliate_page_viewedAffiliate landing renders on the client (AffiliateLandingAnalytics).referrer, locale, page_path, page_title.
affiliate_signup_startedUser submits the signup form before calling the action.locale, page_path, page_title.
affiliate_signup_completedServer action returns success (includes commission info).affiliate_code, commission_rate, discount_rate, locale.
affiliate_dashboard_viewedDashboard loads an affiliate + stats.affiliate_id, total_clicks, total_conversions, pending_payout.
affiliate_link_copiedUser copies the referral link or code from the dashboard widget.affiliate_code, link_type.
affiliate_referral_clickedAffiliateTracker validates cookies and records a click.affiliate_code, landing_page, referrer.
affiliate_conversionCheckout/webhook attributes a sale to an affiliate.affiliate_code, product_id, amount, commission_amount, currency.
affiliate_payout_requestedAffiliate requests a payout from the dashboard.affiliate_id, amount, payment_method.
affiliate_settings_updatedPayment settings are updated via server action.affiliate_id, updated_fields.
affiliate_coupon_appliedCheckout applies an affiliate coupon code.affiliate_code, discount_rate, product_id.

Whenever you ship new affiliate UX, emit the corresponding helper instead of calling trackGAEvent directly so payloads stay aligned.


💻 How to Use

1. Import the events module

import { landingPageEvents, blogEvents, storeEvents } from "@/app/lib/analytics-events"; import { getCurrentPageMetadata } from "@/app/lib/analytics";

2. Track an event

// Inside a client component "use client"; function MyComponent() { const handleClick = () => { const metadata = getCurrentPageMetadata(); landingPageEvents.heroCTAClick({ ...metadata, destination: "/pt#projects", cta_type: "primary", }); }; return <button onClick={handleClick}>Click here</button>; }

3. Inspect events in the console

In development, all events are logged to the console:

[GA4] hero_cta_click { locale: "pt", page_path: "/pt", page_title: "ignitionstack.pro - Home", funnel_stage: "awareness", source_component: "hero_section", destination: "/pt#projects", cta_type: "primary", engagement_type: "click", environment: "development" }

🐛 Debugging

View realtime events in GA4

  1. Open Google Analytics 4
  2. Go to ReportsRealtime
  3. Click View realtime events
  4. Interact with the site and watch events appear

Inspect event parameters

  1. In GA4, go to ConfigureDebugView
  2. Enable debug mode on the site: gtag('set', 'debug_mode', true)
  3. See the full payload for each event

Browser console

Em desenvolvimento, use o console para ver:

// Check if GA4 is loaded window.gtag // Inspect dataLayer window.dataLayer // Force a test event landingPageEvents.heroCTAClick({ locale: "pt", page_path: "/pt", page_title: "Test", funnel_stage: "awareness", destination: "/test", cta_type: "primary" });

1. Conversion funnel

Build a funnel with these events:

  1. hero_cta_click (Awareness)
  2. store_template_view (Consideration)
  3. store_initiate_checkout (Conversion)
  4. purchase (Conversion)

2. Content analysis

Track these events:

3. CTA performance

Compare:


📈 Calculated metrics

Post engagement rate

(blog_post_reaction + blog_post_share) / blog_post_view

Lead magnet conversion rate

insight_lead_magnet_download / insight_lead_magnet_view

Checkout conversion rate

purchase / store_initiate_checkout

Last updated: 2025-10-11 Version: 1.0.0 Maintained by: ignitionstack.pro Team