Expert dataLayer Support Available
Need Help Capturing Data?
Our specialists are ready to help you build your dataLayer and increase data capture.

Validate Your GA4 Ecommerce Setup
with Our DataLayer Inspector

Most GA4 ecommerce tracking looks fine on the surface, until you dig into the dataLayer. Our tool parses and inspects your ecommerce events live, flagging missing fields, incorrect types, and broken schemas before they corrupt your reports.

Check GA4 schema validity
Instantly validate item, promo, and transaction objects.
Spot broken or missing fields
Detect invalid formats, empty keys, and logic gaps.
AI-powered suggestions
Get instant improvement tips based on best practices.
Use your live dataLayer
No install, just inspect, paste, and diagnose.
Launch Inspector

Explore GA4 Ecommerce Schema Examples

Use this tool to explore example dataLayer.push() formats for common GA4 ecommerce events like view_item, add_to_cart, and purchase. You can select a schema from the dropdown to preview its recommended structure and field comments.

Reference: GA4 Item Parameters Explained

The table below lists all supported GA4 item parameters. You can toggle it open to explore what each field means, what data type is expected, and whether it’s required or optional for proper ecommerce tracking.

Extract Ecommerce Events from Your Site

To extract ecommerce tracking data directly from your site, open your browser's developer console (usually by pressing F12 or Right Click β†’ Inspect β†’ Console) and paste the following code snippet. This will return any ecommerce-related dataLayer.push() entries from the current page, which you can then copy and paste into the validator below.

If you are having troube, try typing 'allow pasting' into the console first.

dataLayer.forEach((entry, i) => {
  let ecommerceEntry = null;

  // Case 1: Plain object with ecommerce
  if (entry && typeof entry === 'object' && entry.ecommerce) {
    ecommerceEntry = entry;
  }

  // Case 2: Arguments-like object with ecommerce inside the 3rd param
  else if (
    Object.prototype.toString.call(entry) === '[object Arguments]' &&
    typeof entry[2] === 'object' &&
    entry[2] !== null &&
    entry[2].items // or entry[2].ecommerce if it's standard ecommerce structure
  ) {
    ecommerceEntry = {
      event: entry[1] || 'unknown_event',
      ecommerce: {
        ...entry[2]
      }
    };
  }

  if (ecommerceEntry) {
    const formatted = JSON.stringify(ecommerceEntry, null, 2);
    console.log(`// Ecommerce Push ${i + 1}\ndataLayer.push(${formatted});\n`);
  }
});

Paste your dataLayer.push() below:

Paste your dataLayer.push() object into the box below. When you click Validate, we’ll check the structure and value types against GA4 best practices to flag any issues, missing fields, or type mismatches. This helps ensure your dataLayer is clean, complete, and ready for accurate tracking.

Ready to fix your tracking or run smarter tests? Let’s talk.

Whether you need to fix your tracking, improve your reporting, or run better experiments, we help businesses of all sizes turn analytics and CRO into a real growth engine. Get in touch to see how better data and faster testing can accelerate your results.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.