Skip to content

Releases: keen/keen-analysis.js

v3.7.0

22 May 05:44
Compare
Choose a tag to compare

v3.6.0

19 May 06:19
Compare
Choose a tag to compare

v3.5.0

16 Mar 12:11
Compare
Choose a tag to compare
  • fix for #61
  • updates for .npmignore

v3.4.6

28 Oct 08:14
Compare
Choose a tag to compare
  • fix for extraction data
  • remove unnecessary dependencies

v3.4.5

19 Jul 08:56
Compare
Choose a tag to compare

Fixes:

v3.4.4

11 Jul 06:16
Compare
Choose a tag to compare

New features:

  • global includeMetadata added #59

v3.4.3

09 Jul 07:28
Compare
Choose a tag to compare

Fixes:

v3.4.1

28 May 09:14
Compare
Choose a tag to compare

Fixes:

v3.4.0

14 Mar 11:01
Compare
Choose a tag to compare

New features

  • camelCase conversion
    All parameters provided in a camelCase format will be automatically converted into an API-digestible under_score format - #49

  • client keys validation
    throw an error once client keys are not provided - #47

v3.3.0

12 Feb 11:49
Compare
Choose a tag to compare

Parsing query results #43

resultParsers is an array of functions and the response from API will be parsed by each function.

import KeenAnalysis from 'keen-analysis';

const client = new KeenAnalysis({
  projectId: 'YOUR_PROJECT_ID',
  readKey: 'YOUR_READ_KEY',
  resultParsers: [
    (value) => {
      return Math.round(value);
    }
  ]
});

client.query({
  analysis_type: 'count',
  event_collection: 'pageviews',
  timeframe: 'this_3_months'
  })
  .then(res => {
    // Handle results
  })
  .catch(err => {
    // Handle errors
  });