Complete documentation for every Google Analytics 4 tracking event implemented on the site.
All tracking events are centralized in:
src/app/lib/analytics-events.tsThis system guarantees:
[section]_[component]_[action]Examples:
hero_cta_clickblog_post_card_clickstore_template_downloadcontact_form_submitsnake_case for every parameter
Examples:
source_componentfunnel_stagecta_typetemplate_idAll events include these required parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
locale | string | Page locale | "pt", "en", "es" |
page_path | string | URL path | "/pt/blog" |
page_title | string | Page title | "Blog - ignitionstack.pro" |
funnel_stage | string | Funnel stage | "awareness", "consideration", "conversion", "loyalty" |
source_component | string | Source component | "hero_section", "blog_list" |
engagement_type | string | Interaction type | "click", "impression", "form", "tab_change" |
Event: hero_cta_click
Fires when the user clicks a hero CTA
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
destination | string | Destination URL | "/pt#projects" |
cta_type | string | CTA type | "primary", "secondary" |
Track when:
Event: nav_item_click
Fires when the user clicks a menu item
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
nav_item | string | Menu item | "nav_about", "nav_projects" |
destination | string | Destination URL | "/pt#about" |
Track when:
Event: project_card_click
Fires when the user clicks a project card
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
project_id | string | Project ID | "firechat" |
project_name | string | Project name | "FireChat" |
destination | string | URL de destino | "/pt/projetos/firechat" |
Event: project_tab_change
Fires when the user changes a project tab
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
tab_name | string | Tab name | "frontend", "fullstack", "mobile" |
Event: footer_link_click
Fires when the user clicks a footer link
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
link_category | string | Link category | "navigation", "legal" |
link_label | string | Link label | "Blog", "Privacidade" |
destination | string | URL de destino | "/pt/blog" |
Event: footer_social_click
Fires when the user clicks a social icon
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
social_platform | string | Social platform | "github", "linkedin", "twitter" |
destination | string | URL de destino | "https://github.com/..." |
Event: blog_post_card_click
Fires when the user clicks a blog post card
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
post_id | string | Post ID | "next-js-performance" |
post_title | string | Post title | "Como otimizar Next.js" |
post_category | string | Category | "frontend", "backend" |
Event: blog_filter_change
Fires when the user changes a filter
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
filter_type | string | Filter type | "category", "search" |
filter_value | string | Filter value | "frontend", "next.js" |
Event: blog_search
Fires when the user performs a search
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
search_query | string | Search term | "react hooks" |
results_count | number | Number of results | 5 |
Event: blog_post_reaction
Fires when the user adds a reaction
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
post_id | string | Post ID | "next-js-performance" |
reaction_type | string | Reaction type | "like", "love", "fire", "clap", "mind_blown" |
Event: blog_post_share
Fires when the user shares a post
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
post_id | string | Post ID | "next-js-performance" |
share_platform | string | Platform | "twitter", "linkedin", "whatsapp", "copy_link" |
Event: blog_reading_progress
Fires at reading milestones (25%, 50%, 75%, 100%)
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
post_id | string | Post ID | "next-js-performance" |
progress_percentage | number | Progress percentage | 25, 50, 75, 100 |
Event: insight_card_click
Fires when the user clicks an insight card
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
insight_id | string | Insight ID | "arquitectura-microservices" |
insight_title | string | Title | "Microservices Guide" |
insight_category | string | Category | "architecture" |
Event: insight_lead_magnet_view
Fires when a lead magnet is displayed
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
insight_id | string | Insight ID | "arquitectura-microservices" |
lead_magnet_title | string | Material title | "Microservices eBook" |
Event: insight_lead_magnet_download
Fires when the user downloads the material
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
insight_id | string | Insight ID | "arquitectura-microservices" |
lead_magnet_title | string | Material title | "Microservices eBook" |
email_captured | boolean | Email captured | true, false |
Event: insight_newsletter_subscribe
Fires when the user subscribes to the newsletter
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
source | string | Signup source | "modal", "inline" |
Event: store_template_view
Fires when a template is displayed (impression)
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
template_id | string | Template ID | "saas-dashboard" |
template_name | string | Template name | "SaaS Dashboard Pro" |
price_type | string | Price type | "free", "one-time", "subscription" |
Event: store_template_demo_click
Fires when the user clicks “View Demo”
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
template_id | string | Template ID | "saas-dashboard" |
template_name | string | Template name | "SaaS Dashboard Pro" |
Event: store_initiate_checkout
Fires when the user starts a checkout
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
template_id | string | Template ID | "saas-dashboard" |
template_name | string | Template name | "SaaS Dashboard Pro" |
price | number | Price | 199.90 |
price_type | string | Price type | "one-time", "subscription" |
currency | string | Currency | "BRL" |
Event: purchase (GA4 standard e-commerce)
Fires when a purchase is completed
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
template_id | string | Template ID | "saas-dashboard" |
template_name | string | Template name | "SaaS Dashboard Pro" |
price | number | Price | 199.90 |
price_type | string | Price type | "one-time" |
currency | string | Currency | "BRL" |
transaction_id | string | Transaction ID | "ch_xxx" |
Event: store_template_download
Fires when a free template is downloaded
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
template_id | string | Template ID | "landing-page-free" |
template_name | string | Template name | "Landing Page Basic" |
Event: contact_form_start
Fires when the user starts filling out the form
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
form_id | string | Form ID | "contact_main" |
Event: contact_form_submit
Fires when the form is submitted
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
form_id | string | Form ID | "contact_main" |
form_subject | string | Selected subject | "project", "mentoring" |
success | boolean | Successful submission | true, false |
Event: contact_form_error
Fires when the form has an error
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
form_id | string | Form ID | "contact_main" |
error_type | string | Error type | "validation", "network" |
error_field | string | Field with error | "email", "message" |
Event: projects_card_click
Fires when the user clicks a project
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
project_id | string | Project ID | "firechat" |
project_name | string | Project name | "FireChat" |
project_category | string | Category | "frontend", "fullstack" |
Event: projects_github_cta_click
Fires when the user clicks “View on GitHub”
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
project_id | string | Project ID | "firechat" |
project_name | string | Project name | "FireChat" |
destination | string | GitHub URL | "https://github.com/..." |
Event: projects_live_demo_click
Fires when the user clicks “View Demo”
Additional parameters:
| Parameter | Type | Description | Example |
|---|---|---|---|
project_id | string | Project ID | "firechat" |
project_name | string | Project name | "FireChat" |
destination | string | Demo URL | "https://demo.firechat.com" |
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.
| Event | Fires when | Key parameters |
|---|---|---|
affiliate_page_viewed | Affiliate landing renders on the client (AffiliateLandingAnalytics). | referrer, locale, page_path, page_title. |
affiliate_signup_started | User submits the signup form before calling the action. | locale, page_path, page_title. |
affiliate_signup_completed | Server action returns success (includes commission info). | affiliate_code, commission_rate, discount_rate, locale. |
affiliate_dashboard_viewed | Dashboard loads an affiliate + stats. | affiliate_id, total_clicks, total_conversions, pending_payout. |
affiliate_link_copied | User copies the referral link or code from the dashboard widget. | affiliate_code, link_type. |
affiliate_referral_clicked | AffiliateTracker validates cookies and records a click. | affiliate_code, landing_page, referrer. |
affiliate_conversion | Checkout/webhook attributes a sale to an affiliate. | affiliate_code, product_id, amount, commission_amount, currency. |
affiliate_payout_requested | Affiliate requests a payout from the dashboard. | affiliate_id, amount, payment_method. |
affiliate_settings_updated | Payment settings are updated via server action. | affiliate_id, updated_fields. |
affiliate_coupon_applied | Checkout 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.
import { landingPageEvents, blogEvents, storeEvents } from "@/app/lib/analytics-events";
import { getCurrentPageMetadata } from "@/app/lib/analytics";// 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>;
}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"
}gtag('set', 'debug_mode', true)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"
});Build a funnel with these events:
hero_cta_click (Awareness)store_template_view (Consideration)store_initiate_checkout (Conversion)purchase (Conversion)Track these events:
blog_post_card_clickblog_reading_progressblog_post_reactionblog_post_shareCompare:
hero_cta_click (primary vs secondary)store_cta_clickfooter_link_clicknav_item_click(blog_post_reaction + blog_post_share) / blog_post_viewinsight_lead_magnet_download / insight_lead_magnet_viewpurchase / store_initiate_checkoutLast updated: 2025-10-11 Version: 1.0.0 Maintained by: ignitionstack.pro Team