Google Tag Manager/Analytics inside DataTables

Google Tag Manager/Analytics inside DataTables

WhistringWhistring Posts: 1Questions: 0Answers: 0

Hi everyone!

Has anyone here worked with Google Tag Manager or Google Analytics for tracking interactions inside DataTables?

I’m looking at ways to get more insight into how people actually use the tables — things like which filters they apply most, how often they paginate, and whether certain columns get sorted more than others. I’ve seen examples of sending these events to GA through GTM, but I’m curious if anyone has a method that avoids cluttering the code too much.

I came across this article on customer data analytics that got me thinking about how to structure the data for better reporting: https://stape.io/blog/customer-data-analytics.

Has anyone built something similar or found an efficient way to connect DataTables interactions to a tracking setup?

Replies

  • allanallan Posts: 64,920Questions: 1Answers: 10,752 Site admin

    Your best bet would be to use draw and state(). Check if the state you are interested in has changed and if so call the logger.

    In the case of search, you might want to consider enabling searchDelay so you don't get a logged event for every keystroke.

    Allan

Sign In or Register to comment.