Need help regarding passing of countly api

Hi everyone,

Sorry if i am asking stupid questions but i am working with countly api v1 and it returns data in raw format. i don't know how do i parse that in javascript.

Countly documentation give us this link to parse the response but i don't understand how to do this. can anyone please guide me

Thanks

0

Comments

7 comments
  • Hello,
    can you specify example of what data you retrieve and want to visualize?

    0
    Comment actions Permalink
  • hi,
    i need few basic data like total users, active users, sessions, top devices, top carrier, top platform

    0
    Comment actions Permalink
  • Each of these have different models.

    Loading data can is usually done like this:

    Then you have some common functions to transform fetched data, like top bars:

    Those are mostly the same for all metrics, like devices, app versions, etc

    But for total users, sessions, new users, it is a bit different and can be done with countly.session.js:

    0
    Comment actions Permalink
  • so it's look like that i need to copy paste these helper functions into my project and manually remove all the unnecessary code?

    I am using react.js on the client side and i am using countly rest api to fetch data then manually show them as graph, right?

    0
    Comment actions Permalink
  • Yes, unfortunately there are no stand alone processing, but you can dive into the model files, I think mostly they use countlyCommon file, so I think you would only need to copy that one and use it

    0
    Comment actions Permalink
  • Another thing you might be interested is to rather query aggregated and calculated data directly from API through these endpoints:
    https://resources.count.ly/v1.0/reference#oanalyticssessions
    https://resources.count.ly/v1.0/reference#oanalyticsmetric
    https://resources.count.ly/v1.0/reference#oanalyticstops

    0
    Comment actions Permalink
  • alright, thanks alot for the help. let me read these files. i will ask you if i need more help. thanks alot again

    0
    Comment actions Permalink

Please sign in to leave a comment.