Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Would like to add Google Pagetracker link to each quicktab so I can follow how often each quicktab is clicked on in Google Analytics. I see it might be possible looking at the source code but I'm wondering if there could be some integration with the Google Analytics module.
Comments
Comment #1
jhack31 CreditAttribution: jhack31 commentedI support this request. This would be awesome as 99% of the content of my site is now tabbed.
Comment #2
meramo CreditAttribution: meramo commentedSo guys no workaround since 2009? Would love to know how to track clicks on tabs, probably with ga events or something like this
Comment #3
kevinorin CreditAttribution: kevinorin commentedWould still like to be able to add tracking to Quick tabs. Just posting here to keep this thread going/active.
Comment #4
ultimateboy CreditAttribution: ultimateboy commentedI was playing around with this the other day and it's actually quite easy. I wonder if there are standards for how ga_events should be fired from within Drupal modules, I can't think of any that do this currently.
Registering a google analytics event is pretty straight forward: (this is pulled from google's documentation)
I propose something along the following lines:
_trackEvent('Quick Tabs', 'Click', 'http://example.com/node#quickset-qt1_0')
I think the first and second parameters make sense, the third is tricky. GA doesn't really associate Events with specific pages (at least from what I can tell), and that's really useful information to know. Therefore, I think the third parameter should be the full url to the tab so that we know the tab the user clicked on and the page they did it on.
I'll clean up my code and post a patch soon, but I thought I'd at least get the discussion going again.
Comment #5
spandrelmatic CreditAttribution: spandrelmatic commentedIt's very good news that someone is interested in working on this. It would certainly be great to be able to track which Quicktabs users are clicking via Google Analytics, especially since that information could be compared to other user data (e.g. geographic location) to evaluate usage patterns. Does anyone know what the timeline might be on this? And are there workarounds that could be implemented now?
Comment #6
ultimateboy CreditAttribution: ultimateboy commentedspandrelmatic, the timeline is dependent upon this issue deciding on a standard for the _trackEvent() call. If you like my proposed solution, please say so...
Truthfully, the code to make this work is dead simple. Once we decide on a standard, I'll add it to the module.
Comment #7
spandrelmatic CreditAttribution: spandrelmatic commentedThanks for your reply, uboy. Your proposed solution with respect to the _trackEvent() call definitely makes a lot of sense to me, and it's exactly the sort of solution that would solve my immediate problem ... so you can count this as a vote in favor. :)
I suppose the forward-looking and community-minded question to ask at this point is what other use cases this approach would or would not serve well, but so far I haven't thought of any downsides (though it's true that GA can be something of a moving target). But from my point of view, I would say go for it whenever you have the time to do so.
Once again, thanks very much for your work on this.
Comment #8
joe_pixelrow CreditAttribution: joe_pixelrow commented+1 for tracking on quicktabs.
Ideally a solution that will work with Universal Analytics as it seems everyone will have to switch over soon.
Comment #9
KevinOrin-1 CreditAttribution: KevinOrin-1 commentedWas this module ever updated for Google tracking?
Comment #10
james.bcn CreditAttribution: james.bcn commentedAny progress on this? I have had a request from a site administrator for this functionality. It would be really useful. Can we get it added?