You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we have a bunch of events that are broadcast, but we dont really use.
I suggest we have the Analytics subsystem listen to those events and remove all analytics code from the controller.
We currently broadcast the following events:
cart.add an item was added to the cart cart.empty the cart was emptied account.login user signed in account.logout user signed out loading.start loading animation triggered loading.end loading animation ended
We should add a few more events:
checkout.complete a checkout has completed, passes order data page.view page or section has changed, passes url (and optionally section)
We then make the underlying analytic subsystem pluggable. (By default we use Google Anaytics, but we can have more than one)
We create a new provider called AnalyticsProvider which gives us the ability to define what Analytics handlers we want to use a boot up time. e.g.
# totally optional, by default google analytics is used
YourApp.config (AnalyticsProvider) ->
AnalyticsProvider.systems = [Sprangular.GoogleAnalytics, MyAwesomeCustomAnalytics]
Activity
joshnuss commentedon Jun 15, 2015
Here's some ideas:
Right now we have a bunch of events that are broadcast, but we dont really use.
I suggest we have the Analytics subsystem listen to those events and remove all analytics code from the controller.
We currently broadcast the following events:
cart.addan item was added to the cartcart.emptythe cart was emptiedaccount.loginuser signed inaccount.logoutuser signed outloading.startloading animation triggeredloading.endloading animation endedWe should add a few more events:
checkout.completea checkout has completed, passes order datapage.viewpage or section has changed, passesurl(and optionallysection)We then make the underlying analytic subsystem pluggable. (By default we use Google Anaytics, but we can have more than one)
We create a new provider called
AnalyticsProviderwhich gives us the ability to define what Analytics handlers we want to use a boot up time. e.g.