Use Javascript to show reports

David-123

23-06-2020

Hi All,

 

I am a long time user of Analytics, however I have never used the API (1.4 or 2.0) before now. Keeping it extremely simply, I am looking to build an Intranet page that shows me the number of visitors we have had this week, so that non Adobe users can see some metrics without logging in.

 

So far I have found a few things on github for using API 1.4 which is now out of date (https://www.youtube.com/watch?v=xjnRZdlocgA) and how to extract an API 2.0 request with the swagger ui.

 

Whilst I am sure that this is technically possible, does anybody know of a guide on how this can be done as I am now several days into researching this.

 

Thanks

 

Dave

API javascript

Accepted Solutions (1)

Accepted Solutions (1)

raj_mandalapu

23-06-2020

Couple of things which I want to highlight,

Maybe the GitHub you are pointing is old, but the concepts remain same.

Communicating with REST API's will not change, you need to use username, secret key, companyName, server details to connect with adobe analytics.

You can find this information in the Admin console-> company information.

You need to understand JSON Objects because, the REST API's accepts JSON object, so you need to know what format the endpoint expects accordingly, you need to build and pass the JSON Object to the API

If you are planning to use JQuery, you can use AJAX request by passing the JSON object as a parameter

Choosing the JQuery or some other technology is based on your comfort level.

Once you get the JSON response, using front end technologies HTML5/css/JS you can showcase on the page based on our requirements.

 

The important thing is, every REST API hit counts, so it is good to write some scheduler and store the result data in some location and read it from there.

 

 

 

 

Answers (0)