Query metrics every 5 minues | Community
Skip to main content
January 23, 2022
Solved

Query metrics every 5 minues

  • January 23, 2022
  • 3 replies
  • 2162 views

We use Adobe Experience to store website analytics. We need to query the metrics using Adobe Analytics API (rest interface). Can I query the analytics at every 5 minutes interval? For example, I want to get the metrics for every 5 minutes from 0th hour of today until five minutes ago. If yes, can you please provide a sample request in Json format?

 

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Alexis_Cazes_

So what you can do is first:

  • Create an Adobe I/O integration as it will be needed to use Adobe Analytics API
  • Check Adobe Analytics API 2.0, don't use 1.4. Also if you want to reproduce same data as from the Analysis Workspace report, in Analysis Workspace go to Help > Enable Debugger and you will see a little bug next to the table you built. Click on it and it will provide you the API structure call. So create a table with hours or minute granularity and check the API call
  • Now that you have everything ready you just need to make the API call

Now what I guess you want is real-time data and Adobe has a functionality but it is way too limited. There is also the livestream API that is only in 1.4 as far as I can see. For your use I won't bother with it.

 

Also please bear in mind that Adobe Analytics has a processing time of in average from 30 minutes to 90 minutes. This means that some metrics will not be updated straight away like visits for example.

 

So I would maybe not query every 5 minutes depending on your metrics and dimensions.

3 replies

Level 2
January 24, 2022

@rohithaksha I will suggest to check the below link once :-

https://github.com/AdobeDocs/analytics-1.4-apis/blob/master/docs/live-stream-api/getting_started.md#

If this fullfills your requirement than you need to check if the above is in the contract or not.

Level 3
January 24, 2022

@rohithaksha You can refer the below Github for the Query the Metrics and it have the sample JSON also for your refrence.

URL:- https://github.com/AdobeDocs/analytics-2.0-apis/blob/master/calculatedmetrics.md#:~:text=The%20Analytics%202.0%20Calculated%20Metrics,Calculated%20Metrics%2C%20see%20Adobe%20Help

 

Thank You

Alexis_Cazes_
Alexis_Cazes_Accepted solution
Level 10
January 28, 2022

So what you can do is first:

  • Create an Adobe I/O integration as it will be needed to use Adobe Analytics API
  • Check Adobe Analytics API 2.0, don't use 1.4. Also if you want to reproduce same data as from the Analysis Workspace report, in Analysis Workspace go to Help > Enable Debugger and you will see a little bug next to the table you built. Click on it and it will provide you the API structure call. So create a table with hours or minute granularity and check the API call
  • Now that you have everything ready you just need to make the API call

Now what I guess you want is real-time data and Adobe has a functionality but it is way too limited. There is also the livestream API that is only in 1.4 as far as I can see. For your use I won't bother with it.

 

Also please bear in mind that Adobe Analytics has a processing time of in average from 30 minutes to 90 minutes. This means that some metrics will not be updated straight away like visits for example.

 

So I would maybe not query every 5 minutes depending on your metrics and dimensions.

January 29, 2022

Thank you all for the replies.

 

Regarding choosing API2.0, can I select the API version while creating the project in Adobe Developer Console (where we upload certificates and get the API key/secret etc.)? If not, where do I set the API version?

Alexis_Cazes_
Level 10
March 9, 2022

IN Adobe I/O you do not really choose the version of the API. You simply configure an integration with the Adobe API which will allow you to generate an access token. You should then use the correct API version endpoint with the credentials provided in your integration and the access token you generated.

 

Check out the github page https://github.com/AdobeDocs/analytics-2.0-apis/tree/master