Custom Events

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

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': {
        'eventName':'w_contact_submitted', // GA4 event name - max. 40 characters (use only lowercase and underscore)
        '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-PZZP5RR

Get your Advanced Web Analytics Setup Bundle!

Save 30+ hours of struggling with setup and coding.

Learn more