Custom Events

Custom event can be used for tracking specific ationss like dynamic form submission

Showing a modal window can be tracked as virtual pageview.

Dynamic Form Submission Tracking – Custom Event

If you want to push special event to Google Analytics, you can use this piece of code and just change eventCategory, eventAction, eventLabel and eventValue values.

dataLayer.push({
    'event':'wasCustomEvent',
    'wasCustomEventData': {
        'eventCategory':'Form Submit',
        'eventAction':'Contact',
        'eventLabel':formProduct,
        'eventValue': 0
    },
    'eventCallback' : function() {
        dataLayer.push({'wasCustomEventData': undefined });
    }
}); 

Internal search (test)

About this website

This website is a demo/test website for Advanced Web Analytics Setup Bundle.


GTM used on this website is GTM-KQKCJN4

Get your Advanced Web Analytics Setup Bundle!

Save 30+ hours of struggling with setup and coding.

Learn more