Skip to content

Analytics support #173

Open
Open

Description

@rodrigodalcindev

Analytics support should be modular as to ensure no important components are overlooked, such as:

  • eComm plugin
  • Custom events
  • Virtual page views

Activity

  1. joshnuss commented on Jun 15, 2015

    @joshnuss
    Contributor

    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.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] 
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions