1. Home
  2. Troubleshooting
  3. Tracking GTM custom Events in WebEngage

Tracking GTM custom Events in WebEngage

WebEngage SDK’s allow you to track custom events and user logins/attributes. Which you can use later for user-segments analytics and even for targeting engagements. Its a very powerful way of knowing and selecting your audience for engagement.

If you are using GTM on your web-site for third-party integration and custom event tracking with GA and other third-parties. And if you want start tracking this information with WebEngage, it is possible by adding custom tag in your GTM container and and invoking it with the triggers configured for these custom events in GTM.


Tag holds the content that needs to go onto HTML page mark-up.

Trigger helps in deciding when a tag needs to be invoked.

Variables are reusable dynamic values in GTM, they could be global variables or JavaScript code snippets. Google also provides bunch of variables by default and also lets you create
and custom variables.

Generic tag to log custom GTM events to WebEngage (whatever that is passed in the custom-event is captured as event attributes in the webengage.track) –

Sample screenshot of GTM tag for tracking events with WebEngage –

Invoking Tag on Triggers defined in GTM –

Code snippet shared above is very generic, if you have a specific use case and want to customize the above code to suit your need, we will assist you. Get in touch.

Was this article helpful?