Configure GTM Data Layer

The Data Layer is the foundation of your tracking setup. It’s a JavaScript object that stores information about user interactions and page data, which GTM uses to trigger tags and send data to your analytics platforms.

Data Layer Settings Page

Understanding the Data Layer

What is a Data Layer?

A data layer is a structured format for organizing the information you want to track. When a user performs an action (like adding a product to cart), the app pushes an event to the data layer, which GTM then uses to fire the appropriate tags.

GroPulse Data Layer Name

The app uses a custom data layer named: groPulseGTMDatalayer

This ensures compatibility and avoids conflicts with other tracking implementations.

Accessing Data Layer Settings

  1. Open the GroPulse GTM & Data Layer app
  2. Click Configure data layer from the Dashboard

Available Events

E-Commerce Events

EventTriggerData Included
purchaseOrder completedOrder ID, revenue, tax, shipping, products
begin_checkoutCheckout startedCart items, cart value, currency
add_to_cartProduct added to cartProduct details, quantity, price
remove_from_cartProduct removed from cartProduct details, quantity
view_itemProduct page viewedProduct details, price, category
view_item_listCollection page viewedCollection name, products displayed

Page Events

EventTriggerData Included
page_viewAny page loadPage title, URL, referrer

Event Data Structure

Each event includes structured data following Google’s recommended e-commerce schema:

Purchase Event Example

{
  event: 'purchase',
  ecommerce: {
    transaction_id: '12345',
    value: 99.99,
    tax: 8.50,
    shipping: 5.99,
    currency: 'USD',
    items: [
      {
        item_id: 'SKU123',
        item_name: 'Product Name',
        item_brand: 'Brand Name',
        item_category: 'Category',
        price: 49.99,
        quantity: 2
      }
    ]
  }
}

Add to Cart Event Example

{
  event: 'add_to_cart',
  ecommerce: {
    currency: 'USD',
    value: 49.99,
    items: [
      {
        item_id: 'SKU123',
        item_name: 'Product Name',
        price: 49.99,
        quantity: 1
      }
    ]
  }
}

Configuring Events

Enabling/Disabling Events

  1. Navigate to Data Layer Settings
  2. Toggle each event on or off based on your needs
  3. Click Save to apply changes

Recommended Configuration

For most stores, we recommend enabling:

  • Track purchases (Essential for conversion tracking)
  • Track add to cart (Important for funnel analysis)
  • Track checkout starts (Identify checkout abandonment)
  • Track product views (Understand product interest)

Google Consent Mode V2

The app supports Google Consent Mode V2 for GDPR compliance:

What is Consent Mode?

Consent Mode allows Google tags to adjust their behavior based on user consent status. When a user doesn’t consent to cookies:

  • Tags can still send anonymized data
  • Conversion modeling fills in data gaps
  • Full compliance with privacy regulations

Enabling Consent Mode

  1. In Data Layer Settings, find the Google Consent Mode V2 section
  2. Toggle the feature On
  3. Configure the consent banner (see Consent Management)

Consent States

StateDescription
ad_storageEnables storage for advertising (cookies)
analytics_storageEnables storage for analytics
ad_user_dataConsent to send user data to Google
ad_personalizationConsent for personalized advertising

Custom Events

Creating Custom Events (Advanced Plan)

For stores with specific tracking needs, custom events allow you to track any user interaction:

  1. Navigate to Data Layer Settings
  2. Scroll to Custom Events section
  3. Click Add Custom Event
  4. Define:
    • Event name
    • Trigger conditions
    • Data to include

Common Custom Event Use Cases

  • Newsletter signup
  • Wishlist additions
  • Product reviews
  • Quick view opens
  • Filter usage
  • Search queries

Server-Side Events

For improved data accuracy, the app supports server-side event tracking:

Benefits of Server-Side Events

  1. Better data accuracy – Not affected by ad blockers
  2. Improved attribution – More reliable conversion tracking
  3. Enhanced privacy – Data processed server-side
  4. Cross-platform consistency – Same data to all platforms

Server-Side Event Configuration

Server-side events are automatically configured when you:

  1. Enable the corresponding client-side event
  2. Have a paid plan (Pro or Advanced)
  3. Configure the platform’s API credentials (e.g., Facebook Conversion API token)

See Server-Side Events Guide for detailed setup.

Data Layer Variables in GTM

After importing the template, these variables are available in GTM:

Built-in Variables

VariableDescription
DLV - ecommerce.transaction_idOrder ID
DLV - ecommerce.valueTransaction value
DLV - ecommerce.currencyCurrency code
DLV - ecommerce.itemsProduct array

Using Variables in Tags

  1. In GTM, create or edit a tag
  2. Click the variable selector ({{)
  3. Choose the appropriate data layer variable
  4. The value will be populated when the event fires
GTM Variable Selector

Troubleshooting

Events Not Firing

  1. Check Event Status: Verify the event is enabled in Data Layer Settings
  2. Check App Activation: Ensure the app is activated in your theme
  3. Use GTM Preview: Test events in GTM Preview mode
  4. Check Console: Look for JavaScript errors in browser console

Incorrect Data

  1. Check Product Data: Ensure products have SKUs and prices set
  2. Check Currency: Verify store currency matches expected format
  3. Clear Cache: Some data layer values may be cached

Missing Variables in GTM

  1. Import Template: Ensure you’ve imported the latest template
  2. Check Variable Names: Variable names are case-sensitive
  3. Verify Event Trigger: Make sure the trigger matches the event name

Best Practices

  1. Start Simple: Enable core events first, then add more
  2. Test Thoroughly: Use GTM Preview mode before publishing
  3. Monitor Data: Regularly check your analytics for data quality
  4. Keep Updated: Import new templates when adding platforms
  5. Document Changes: Note what events you’ve enabled and why

Next Steps

Last updated on February 16, 2026

Was this article helpful?

NEXT

How to Find a TikTok Pixel ID

Powered by Support Genix