Guides

E-Commerce Tracking

Glass can track products sold, quantity, revenue, and currency.

Glass will link these to anonymous user sessions, providing attribution to ad networks and campaigns.

E-commerce tracking in Glass requires adding additional tracking script to your website, that is triggered upon conversions.

Glass automatically detects Google Analytics 4 e-commerce revenue events

If you already have Google Analytics 4 revenue tracking installed in your site, you don't need to do anything. Glass will detect these conversions. Learn more.

E-Commerce Revenue Tracking

How to Track Revenue in Glass

  1. Set up Glass on your website.

    Make sure Glass is installed and working on your website already.

  2. Add the revenue tracking script.

    All fields are required.

    <script>
    glassq.push(['revenue',{
         amount: 100,
         product: 'Widget',
         currency: 'USD',
         quantity: 1,
         event_type: 'revenue'
    }]);
    </script>  
    

    You will need to call glass.revenue for each line item.

  3. Pass through your checkout process

    Verify data is being received in Glass.

Frequently Asked Questions

Can I install this script via Google Tag Manager?

Yes, you can install Glass revenue tracking inside Google Tag Manager.

Make sure you use tag sequencing so that the conversion tracking script fires after the Glass analytics.js script is loaded.

Does Glass convert currencies?

No. Glass can track sales in different currencies, but will not convert between currencies.

How long can product names be?

The maximum product name length is 100 characters.

Can I track SKUs?

We don't track SKUs separately; you should append these to the product name when tracking.