Accurate tracking is the foundation of a data-driven marketing strategy. Google Analytics 4 (GA4) and Google Tag Manager (GTM) work together to provide deep insights into user behavior, campaign performance, and sales conversions. In this guide, we’ll walk through how to set up GA4 and GTM for marketing & sales tracking, including defining key events, tracking setup, and best practices.
Step 1: Setting Up GA4 for Marketing & Sales Tracking
1. Create a GA4 Property
- Go to Google Analytics and click Admin.
- Under Account, select or create an account.
- Under Property, click Create Property → Name it (e.g., “Business Analytics GA4”).
- Select your time zone and currency → Click Next.
- Choose your industry category and business size → Click Create.
2. Install GA4 on Your Website
- If you’re using GTM, follow the instructions below to install GA4 via GTM.
- If you prefer direct installation:
- Copy your Measurement ID from GA4 (format:
G-XXXXXXXXXX
). - Paste it into your website’s
<head>
section using the Global Site Tag (gtag.js).
- Copy your Measurement ID from GA4 (format:
3. Configure GA4 Data Streams
GA4 uses Data Streams to collect website and app data.
- In GA4, navigate to Admin → Data Streams → Add Stream (Choose Web, iOS, or Android).
- Enter your Website URL and give the stream a name (e.g., “Website Traffic”).
- Enable Enhanced Measurement to automatically track pageviews, scrolls, outbound clicks, and more.
4. Set Up Key Events for Marketing & Sales
GA4 moves beyond basic session tracking and focuses on event-based tracking. Define key events based on your sales funnel:
Stage | Event Name | Example Use Case |
---|---|---|
Awareness | page_view | Tracking website traffic |
Consideration | view_promotion | Measuring promo interactions |
Decision | generate_lead | Lead form submissions |
Conversion | purchase | Sales transactions |
Retention | login | User sign-ins & app engagement |
- To create custom events, go to Admin → Events → Create Event.
- Use conditions like Event Name, Page Path, Click URL to define tracking rules.
Step 2: Setting Up Google Tag Manager (GTM) for GA4 Tracking
1. Create a GTM Account & Container
- Go to Google Tag Manager → Click Create Account.
- Enter Account Name (e.g., “Company GTM”).
- Select Container Type (Web, iOS, Android, AMP) → Click Create.
- Accept terms and get your GTM Container Snippet.
- Add the GTM
<script>
to your website’s<head>
and<body>
.
2. Set Up a GA4 Configuration Tag
- In GTM, navigate to Tags → New → GA4 Configuration.
- Enter your GA4 Measurement ID.
- Set Triggering to All Pages (fires on every page load).
- Save & Publish the tag.
3. Create Event Tracking Tags in GTM
For key events like form submissions, button clicks, or purchases:
- Go to Tags → New → GA4 Event.
- Set the Configuration Tag to your GA4 property.
- Enter the Event Name (e.g.,
generate_lead
,purchase
). - Set up Triggers (e.g., clicks, form submissions, or page views).
- Save & publish.
4. Test Tracking with GTM Preview Mode
Before publishing changes, verify that events fire correctly:
- In GTM, click Preview.
- Enter your website URL and click Connect.
- Perform actions (e.g., form submissions, button clicks) and check the Tag Assistant.
- Ensure that the correct tags fire when expected.
Step 3: Best Practices for GA4 & GTM Tracking
✅ Use Standardized Naming Conventions – Keep event names and parameters consistent across platforms for accurate reporting.
✅ Leverage Custom Dimensions & Parameters – Enhance event tracking with custom parameters like user_type, transaction_id, or campaign_id.
✅ Ensure Cross-Domain Tracking is Enabled – If you track conversions across multiple domains, enable cross-domain tracking in GA4 settings.
✅ Set Up UTM Parameters for Marketing Attribution – Always append UTMs (utm_source
, utm_medium
, utm_campaign
) to marketing links for accurate traffic attribution.
✅ Regularly Audit & Test Your Setup – Use GTM Debug Mode and GA4 Realtime Reports to verify tracking accuracy.
Final Thoughts
GA4 and Google Tag Manager provide a powerful combination for tracking marketing & sales performance. By setting up structured event tracking, businesses can gain deep insights into user behavior, campaign effectiveness, and conversion optimization.
Next Steps
In the upcoming articles, we’ll explore:
- Multi-Touch Attribution Models: Understanding Customer Journeys
- How to Optimize Funnels Using GA4 & Looker Studio
- Automation Strategies for Marketing & Sales Tracking
Stay tuned for more Martech insights!