🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

analytics-db-helper

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analytics-db-helper

analytic mongodb helper

latest
npmnpm
Version
1.0.3
Version published
Weekly downloads
1
-93.75%
Maintainers
1
Weekly downloads
 
Created
Source

Analytics Helper mongodb processing

npm install analytics-db-helper

mongodb model should be

{
    ip:{
        type:String,
        required:true
    },
    page:{
        type:String
    },
    duration:{
        type:Object
    },
    mouseTrack:{
        type:String
    },
    url:{
        type:String
    },
    date:{
        type:String
    },
    country:{
        type:String
    },
    countryCode:{
        type:String
    },
    state:{
        type:String
    },
    city:{
        type:String
    },
    browser:{
        type:String
    },
    os:{
        type:String
    },
    timeStamp:{
        type:String
    }
},

Funtions contains

  • Overall statistics
  • Page statistics
  • Os statistics
  • Country statistics
  • Ip statistics
  • Monthly statistics

require package

const analyticsHelper=require("analytics-db-helper")

Overall statistics

analyticsHelper.cardData()
.then(res=>{
    //your code
})
.catch(err=>{
    //your code
})

page statistics

analyticsHelper.pageData()
.then(res=>{
    //your code
})
.catch(err=>{
    //your code
})

Os statistics

analyticsHelper.osData()
.then(res=>{
    //your code
})
.catch(err=>{
    //your code
})

Country statistics

analyticsHelper.mapData()
.then(res=>{
    //your code
})
.catch(err=>{
    //your code
})

ip statistics

analyticsHelper.ipData()
.then(res=>{
    //your code
})
.catch(err=>{
    //your code
})

monthly statistics

analyticsHelper.monthData()
.then(res=>{
    //your code
})
.catch(err=>{
    //your code
})

FAQs

Package last updated on 07 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts