keen/keen-js

Unable to access .query method

Closed this issue · 1 comments

I am trying to integrate keen with react-native app.
But I am not able to access any methods.
import Keen from 'keen-js';

var client = new Keen({ projectId: 'dummy', writeKey: 'dummy' }); console.log(client);

client object gets consoled.

client
  .query('count', {
    event_collection: 'sampleData',
    timeframe: 'this_14_days'
  })
  .then(res => {
    // Handle results
    console.log("queryResult::",res );
  })
  .catch(err => {
    // Handle errors
    console.log("err::",err);
  });

But this gives error as :
err:: [TypeError: undefined is not an object (evaluating 'root.location.protocol')]

Need help on this.

let's talk about it here
keen/keen-analysis.js#28