Solved

Surfacing analytics to my end users (white-labeled embedded analytics)?

  • 29 March 2021
  • 5 replies
  • 821 views

Badge

Hello, I have an engineering team that built an app that allows users to create profiles. I want to show my users analytics, i.e., how many visitors came to their profiles. What’s the best way of doing this using amplitude? Thanks!

icon

Best answer by Saish Redkar 30 March 2021, 06:31

View original

5 replies

Userlevel 7
Badge +10

Hey @rayq 

Really interesting use case!
So as per my understanding you want to use Amplitude to generate analytics about the user profile feature usage and surface these numbers within the app itself, correct?

I would recommend using the https://developers.amplitude.com/docs/dashboard-rest-api to extract the data points you are interested in after you have instrumented usage events on your profiles feature.

There are quite a few endpoints in the Dashboard REST API which you can leverage to query existing saved charts or build an event segmentation chart on the fly programmatically.

Once you are able to do this, you can use the raw data points and visualize it in your app using some charting libraries or whatever fits your use case.

Let me know if I have interpreted your use case correctly. Hope this helps!

 

@Platform Specialists, are there any customers out there who have iframed amplitude charts to achieve a similar end result?

Badge

Hey @rayq 

Really interesting use case!
So as per my understanding you want to use Amplitude to generate analytics about the user profile feature usage and surface these numbers within the app itself, correct?

I would recommend using the https://developers.amplitude.com/docs/dashboard-rest-api to extract the data points you are interested in after you have instrumented usage events on your profiles feature.

There are quite a few endpoints in the Dashboard REST API which you can leverage to query existing saved charts or build an event segmentation chart on the fly programmatically.

Once you are able to do this, you can use the raw data points and visualize it in your app using some charting libraries or whatever fits your use case.

Let me know if I have interpreted your use case correctly. Hope this helps!

 

@Platform Specialists, are there any customers out there who have iframed amplitude charts to achieve a similar end result?

 

Thanks for the reply. I did look at the Dashboard REST API but it seems like the rate limits make it not scalable. 
 

  • Concurrent Limit: You can only run up to 5 concurrent requests across all of our REST API endpoints (including cohort download).
Badge

Just adding on here, I did a bit more of a deepdive. 

cost = (# of days) * (# of conditions) * (cost for the query type)
 

Rate Limit: You can run up to 36,000 cost per hour.


Let’s say I want to aggregate the last 60 days of ‘profile view’ events for a given profile (i.e. 1 condition)

cost = 60*1 = 60

Therefore, 36000/60 = 600, meaning I can only do this query 600 times an hour. I already have 500 users. Granted, not all of them will query at the same time, but I do anticipate having over ten thousands users at some point.

 

Any other options?

Userlevel 7
Badge +10

Hey @rayq 
Yup. Scalability is indeed an issue with using Dashboard REST API.

I had tried this approach when we were trying to pull some chart data into another internal application, but were hit with the rate limits. Had to go through a similar exercise to calculate the query cost for our internal users.

Another way would be to have access to raw event data and then querying it off that. We use Snowflake for this purpose by running custom queries and then sharing the dataset at scale within other business systems. 

You can also create public links to Amplitude charts and try embedding them in your application if that works, but this may bring alongside some potential security and access control issues.

 

Userlevel 2
Badge +3

Hi @rayq!

I’m Nadia from the Platform Team. Happy to step in! That is a good question and a very interesting use case indeed! @Saish Redkar is correct here. The first option would be using the Dashboard REST API but I can definitely understand that it’s not scalable in this case.
The two other options mentioned: querying raw data and embedding public links are the alternatives.

That being said, your feedback is very valuable and I have forwarded this to our product team on your behalf @rayq

Reply