Data AnalyticsBeginner

Web Analytics & Data-Driven Marketing

Measure performance and user behavior with Google Analytics, conversion tracking, and funnel analysis.

5 hours
5 key concepts
2 in-depth sections
Official Docs

0 of 5 concepts completed (0%)

What You'll Learn

1.GA4 Setup & Events

GA4 implementation via GTM: ```html

```

javascript
// Custom event tracking via dataLayer
// Purchase
dataLayer.push({
  event: "purchase",
  ecommerce: {
    transaction_id: orderId,
    value: order.total,
    currency: "USD",
    items: order.items.map(item => ({
      item_id: item.sku,
      item_name: item.name,
      item_category: item.category,
      price: item.price,
      quantity: item.qty,
    }))
  }

// Form submission dataLayer.push({ event: "form_submit", form_name: "contact_form", form_location: "footer", });

// Scroll depth document.addEventListener("scroll", () => { const depth = Math.round( (window.scrollY / (document.body.offsetHeight - window.innerHeight)) * 100 ); if ([25, 50, 75, 90].includes(depth) && !sentDepths.has(depth)) { sentDepths.add(depth); dataLayer.push({ event: "scroll", percent_scrolled: depth }); } }); ```

2.Analysis & Reporting

Funnel analysis in GA4: ``` Exploration → Funnel Exploration

eCommerce funnel: Step 1: view_item (product page) Step 2: add_to_cart (cart action) Step 3: begin_checkout (checkout start) Step 4: add_payment_info (payment entered) Step 5: purchase (conversion)

Key metrics per step: - Completion rate (% who proceed) - Abandonment rate (% who drop off) - Time between steps (friction indicator) ```

Attribution models comparison: | Model | How it works | Best for | |---|---|---| | Last click | 100% credit to last touchpoint | Direct response | | First click | 100% credit to first touchpoint | Awareness channels | | Linear | Equal credit across all touchpoints | Brand campaigns | | Data-driven | ML-based allocation | Established accounts (1000+ conversions) | | Time decay | More credit to recent touchpoints | Short sales cycles |

Custom dashboard KPIs: ``` Acquisition: - Sessions by channel - New users vs returning users - Cost per acquisition (link Ads → GA4)

Engagement: - Average engagement time (replaced bounce rate in GA4) - Pages per session - Scroll depth (requires custom event)

Conversion: - Conversion rate by landing page - Revenue by source/medium - Goal completions by device type ```

Code Example

// Google Analytics 4 Implementation
<!-- GA4 Tag (Global Site Tag) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXXXXX');
</script>

// Track custom events
gtag('event', 'purchase', {
  'transaction_id': '12345',
  'value': 99.99,
  'currency': 'USD',
  'items': [
    {'id': 'product-123', 'quantity': 1, 'price': 99.99}
  ]
});

// E-commerce tracking
gtag('event', 'view_item_list', {
  'items': [
    {'id': 'product-abc', 'name': 'Product A', 'list_name': 'Featured'}
  ]
});

// Conversion funnel:
// Step 1: product_view (awareness)
// Step 2: add_to_cart (interest)
// Step 3: begin_checkout (consideration)
// Step 4: add_payment_info (decision)
// Step 5: purchase (conversion)

// Key metrics to track:
// Bounce Rate: % who leave without action
// Conversion Rate: % who complete goal
// Cost Per Acquisition (CPA): $ spent / conversions
// Return on Ad Spend (ROAS): revenue / ad spend

Pro Tips

  • 1Implement GA4 via Google Tag Manager it makes future tracking changes deploy without touching code.
  • 2GA4's default session timeout is 30 minutes. For content sites where people read for 30+ minutes, extend it to prevent inflated session counts.
  • 3Conversion events should be specific user actions that matter for your business (purchase, form_submit, file_download) not just pageviews.
  • 4Filter out your own IP address and team traffic from GA4 from day one internal traffic skews all metrics and ruins cohort analysis.

Topics Covered

AnalyticsGoogle AnalyticsConversion TrackingReporting

Continue Learning

Explore the official documentation and deepen your knowledge with real-world practice.

Explore the Full Portfolio

This is the complete portfolio of Sufi Khan Sulaiman, a technology leader specialising in B2B commerce and digital automation. Start from the Home page for the overview, then move through two decades of career experience across FLIR Systems, Lorex Technology, and 1c Platform, and the full catalogue of project case studies spanning headless commerce migrations, AI recommendation engines, and multi-channel fulfilment systems.

The skills and certifications page maps the technical and leadership capabilities behind the work, while the articles and the knowledge base break down the thinking into actionable frameworks. For hands-on learning, the tutorials and applications sections cover practical builds from front-end fundamentals to full-stack web apps.

For consulting engagement, the expertise page outlines service offerings, the ecommerce hub covers platform architecture and automation strategy, and the ecommerce guide (PDF) is a downloadable 55-page field manual. When you are ready to talk, the contact page is the direct line.