Google Tag Manager configuration for Twitter Events


#1

Hi,

We are running a wordpress website and share tweets as embedded. What we are looking for is to integrate Twitter Events with Google Analytics Unviersal through Google Tag Manager and get stats for al possible Twitter Events.

A similar configuration exist for YouTube videos in which we first created a Youtube Listener by a javascript and check whether an embedded YouTube video exist or not, that has been enabled through a Javascript Macro and a Rule (event equals youtube)

Now, it is important for us to process the same for embedded Twitters in order have the ability to generate statistics for a specific embedded tweet. I know twitter analytics itself offers such stats but we are talking about a case where a tweet is owned by an advertiser or a third person.

I would really appreciate if you can provide me a detailed configuration step by step, or redirect me to an existing guide (i searched it on the web, but failed to find a solution)

Thanks in advance.


#2

You may attach a callback function to a Twitter widgets JavaScript event to log actions in your analytics tool.
https://dev.twitter.com/web/javascript/events

Google Analytics supports a social interaction framework.
https://developers.google.com/analytics/devguides/collection/analyticsjs/social-interactions

Google Analytics social interaction sample code for ga.js from 2012 may help you log similar events for your own use.


#3