Skip to main content

Custom Event Tracking with Google Tag Manager

How to setup client-side custom event tracking with GTM.

Daniel Busch avatar
Written by Daniel Busch
Updated over 3 months ago

Usecase & Goal

If you want to optimize and measure advanced events that are beyond standard analytics. With that, you can track any custom event client sided, e.g. "User dwells on pricing page for 15 seconds".

Later on you can make those custom events available in your dashboards - see this article: Create Custom Conversions

Note: You can also integrate custom events with a tracking script (advanced): Custom Event Tracking Script

Loom Video Explainer

Google Tag Manager Setup

  1. Login to your Google Tag Manager

  2. Navigate to Tags

  3. Create a new Tag

  4. Name the Tag in a descriptive manner

  5. Tag Configuration: Choose "Custom HTML"

  6. Add the following Code (change the detail placeholder name "Some Interaction" with the name of your Event):

    <script>
    window._adbq = window._adbq || [];
    window._adbq.push([
    'track',
    'web_event_custom',
    {
    attributes: {
    event: {
    detail: 'Some Interaction', //Required
    value: 10.00 //Optional
    }
    }
    }
    ]);
    </script>
  7. Trigger Configuration: Setup as you want the event to trigger

  8. Save it and publish as a new version

If you want to see this event in your dashboard, you have to set it up as described in this article: Create Custom Conversions

Feel free to reach out to us, if you need help with the setup!

Did this answer your question?