We'll eventually need to add analytics (at least Tracks, do we need Google Analytics?) to Gutenboarding.
Some framework type things have to happen first:
@ramonjd said:
Is there a “current” opinion on how we’ll approach analytics/tracking in Gutenboarding?
That is, if we’re going to use client/lib/analytics/index.js
Going over the analytics lib, I’m assuming we’ll want to pull it in, given that we’ll need many of its already-built-in methods (analytics.ga and analytics.tracks)
@jsnajdr said:
We’re working with MarTech team on cleaning up the lib/analytics library, but it goes slowly because of other priorities. Also, the lib/analytics/ad-tracking part, which is quite big and convoluted, will be almost completely replaced by Google Tag Manager.
What parts of analytics will you need? Extracting Tracks and GA to @automattic/calypso-analytics shouldn’t be hard, if we leave the rest in lib/analytics.
Ad Tracking is harder. And there’s also specialized code for tracking page views.
And what do you think about the Redux analytics middleware that’s in Calypso? The lib/analytics module can be either imported and used directly, or indirectly by dispatching Redux actions.
Calypso codebase prefers the Redux approach. The main advantage is for testing: no need to mock the lib/analytics library. Redux actions are dispatched and it’s up to the test code whether it handles them somehow or not.
We'll eventually need to add analytics (at least Tracks, do we need Google Analytics?) to Gutenboarding.
Some framework type things have to happen first:
@ramonjd said:
@jsnajdr said:
Via p1579140697040600-slack-gutenboarding