analytics-integration

Implement GA4-compatible e-commerce conversion tracking across browser and server.

14|3|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-skills-hub --skill analytics-integration-tomtoto757
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analytics-integration
Source: https://github.com/tomtoto757/ecomm-ai-skills-hub/tree/main/skills/platform-integrations-infrastructure/finsilabs/integrations-apis/analytics-integration
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-skills-hub --skill analytics-integration-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implement a robust e-commerce analytics stack that captures accurate conversion events across browser and server, prevents duplicate reporting, and maintains attribution for ad campaigns despite client-side blockers or SPA navigation.

Core Features & Use Cases

  • Structured, GA4-compatible dataLayer design for product, cart, checkout, and purchase events to ensure consistent event shapes consumed by GTM.
  • Dual-mode attribution with Meta Pixel (browser) and Conversions API (server) using shared event IDs for deduplication and GDPR/consent-aware delivery via server-side tagging.
  • Platform guidance and implementation notes for Shopify, WooCommerce, BigCommerce, and custom/headless stores plus Measurement Protocol server fallbacks.
  • Examples: prevent duplicate purchase events from confirmation page reloads, capture SPA route-based page_view events, and send server-side purchases with the correct GA4 client_id.

Quick Start

Use the analytics-integration skill to implement a canonical GA4 dataLayer, add Meta Pixel with a matching server-side Conversions API call, and deploy a GTM server container with credentials in environment variables.

Frequently Asked Questions about analytics-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent duplicate purchase events in GA4 and Meta Pixel?

Prevent duplicate purchase events by using shared event IDs for browser and server-side tagging. This allows GA4 and Meta Conversions API to deduplicate transactions, ensuring accurate conversion tracking even during confirmation page reloads.

How do I implement server-side tagging for GA4 and Meta Conversions API?

Implement server-side tagging by deploying a GTM server container that securely delivers GA4 Measurement Protocol and Meta Conversions API events. Credentials are sourced from environment variables to maintain secure, GDPR-compliant data delivery.

Does this work with Shopify, WooCommerce, BigCommerce, and headless storefronts?

Yes, this works with Shopify, WooCommerce, BigCommerce, and custom or headless storefronts. It provides platform-specific guidance to establish a canonical GA4-compatible dataLayer across various e-commerce architectures.

Why does my conversion tracking lose attribution during SPA navigation?

Conversion tracking loses attribution during SPA navigation because standard page loads do not occur. Capturing SPA route-based page_view events through a structured dataLayer ensures consistent event shapes and maintains ad attribution.

Do I need a canonical dataLayer for GTM e-commerce tracking?

You need a canonical GA4-compatible dataLayer for GTM e-commerce tracking to ensure consistent event shapes for product, cart, checkout, and purchase events. This structured design guarantees reliable data consumption by GTM.

What's the best way to capture the correct GA4 client_id in server-side purchases?

Capture the correct GA4 client_id in server-side purchases by using Measurement Protocol server fallbacks. This ensures server-side purchases are accurately attributed to the right user session in GA4.