9 ms·
This is a cool idea for a project! The closest equivalent I'm aware of is Qubit OpenTag (https://github.com/QubitProducts/OpenTag https://github.com/QubitProduc
by alexdean 14y ago
This is a cool idea for a project! The closest equivalent I'm aware of is Qubit OpenTag (https://github.com/QubitProducts/OpenTag https://github.com/QubitProducts/OpenTag).
I'm interested in adding SnowPlow support to this (https://github.com/snowplow/snowplow https://github.com/snowplow/snowplow) - our tracking API is very similar to Google Analytics's.
We've just gone through the quite involved exercise of mapping SnowPlow to Google Tag Manager (http://snowplowanalytics.com/blog/2012/11/16/integrating-snowplow-with-google-tag-manager/ http://snowplowanalytics.com/blog/2012/11/16/integrating-sno...) so I was a bit surprised in the code to see this mapping for GA events:
track : function (event, properties) {
window._gaq.push(['_trackEvent', 'All', event]);
}
I'm a bit confused by this - how would I use analytics.js to pass through all the valid data that I can log in a GA event or indeed SnowPlow event - https://github.com/snowplow/snowplow/wiki/javascript-tracker#wiki-events https://github.com/snowplow/snowplow/wiki/javascript-tracker...
I think you might be making the assumption that events consist of an event name plus arbitrary JSON envelope. This is a very MixPanelish view of the world - it doesn't really translate to Google Analytics, Piwik, SnowPlow, Omniture...
- ianstormtaylor 14y agoReally good points. I think there is definitely a way for the Mixpanel-esque API to map cleanly via a decided on spec to the GA-style API with 'category' and 'label'. We are thinking about how to solve this in the nicest way possible for the developer right now!
- alexatkeplar 14y agoIt's going to be really hard to make a generic, non-lossy mapping in a static, stateless JS script. Have you looked at Google's dataLayer as an alternative yet? The setup guide for SnowPlow + dataLayer is here in case it's interesting: https://github.com/snowplow/snowplow/wiki/Integrating-javascript-tags-with-Google-Tag-Manager https://github.com/snowplow/snowplow/wiki/Integrating-javasc... The dataLayer approach seems really sound to us - here's hoping other tag management solutions move to something similar (or standardise on Google's dataLayer API).