Data Layer Naming Standards

A Data Layer is standardized, but those standards change based on your industry. Hover over highlighted terms to see how GA4 enforces specific naming conventions vs custom schemas.

Google Analytics 4 Standard E-Commerce
// Standardized GA4 schema
dataLayer.push({
  'event': 'purchase',
  'ecommerce': {
    'transaction_id': 'T12345',
    'value': 99.99,
    'currency': 'USD',
    'items': [{
      'item_id': 'SKU_12345',
      'item_name': 'Running Shoes',
      'price': 99.99
    }]
  }
});
Custom Industry Standard Travel & Airlines
// Custom object mapping
dataLayer.push({
  'event': 'flight_booked',
  'travel_details': {
    'booking_id': 'B-765X',
    'value': 450.00,
    'currency': 'USD',
    'flight_class': 'Business',
    'origin_air': 'JFK',
    'dest_air': 'LHR'
  }
});
💡 Hover over the highlighted code to see how naming conventions differ between 'out-of-the-box' templates and custom data architecture.