Git Product home page Git Product logo

analytics's Introduction

Analytics

See it in action on simpleanalytics.meteor

Features

  • Uses websockets to track visitors
  • Saves the IP address of the visitor
  • Seamlessly integrates with the accounts-base package to track logged in users.
  • Tracks the visitor's behavior using events

Usage

When the package is added every DDP connection will be logged in a mongo collection: Analytics.connections. A connection contains information about the socket along with some additional information.

  • id: String
    The meteor connection id
  • address: String
    The visitor's IP address
  • geoData: Object
    Geospatial data based on the visitors IP address
    • country: String
      2 letter ISO-3166-1 country code
    • region: String
      2 character region code. For US states this is the 2 letter ISO-3166-2 subcountry code for other countries, this is the FIPS 10-4 subcountry code
    • city: String
      This is the full city name
    • ll: [Number]
      The latitude and longitude of the city
  • userAgent: String
    The user agent that was sent un the HTTP header
  • startDate: Date
    The moment the visitor initiated the web socket connection
  • endDate: Date
    The moment the visitor closed the web socket
  • events: [Event]
    An array containing client-side events like 'window.blur' and 'widow.focus'. An Event looks like this
    • name: String
      Event name (for example: 'blur' or 'focus')
    • date: Date
      The moment the event was triggered
    • data: Object optional
      Some data about the event

The events array is a lazy loaded query on the Analytics.events collection. If you want a reactive datasource you should use the eventsCursor property of a connection, this returns a mongo cursor to the same data.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.