Question

Data discrepancy on Funnels between API and UI

  • 14 October 2020
  • 9 replies
  • 144 views

Badge

Hello,

we’re having trouble with a certain client where when using the /funnels endpoint, we’re getting different values on the API than the UI. Any help would be appreciated.

 

Regards


9 replies

Userlevel 6
Badge +3

@Databox —

Without seeing your query in the UI and the query that you are using to hit the API, I am not able to debug— but we recently gave our dev docs a facelift, and you can use this feature to build a query for saved reports in your project: https://developer.mixpanel.com/reference/funnels#funnels-list-saved

Badge

Hi cherise,

thanks for your post, but I’m not comfortable posting funnel_ids in the public forum. Is there a way to confidentially send this to you?

Userlevel 6
Badge +3

Hey @Databox 

Yes please do not share any ids in the forum.

Can you give this linked tool a try? https://developer.mixpanel.com/reference/funnels

You can pull in the specific report instead of recreating a curl request that doesn’t specifically match — like so:

curl 
--request GET \
--url 'https://mixpanel.com/api/2.0/funnels?project_id=PROJECTIDHERE&funnel_id=FUNNELIDHERE' \
--header 'Accept: application/json'

 

Badge

Hi @cherise,

here’s the cURL from the tool, this is the request (sans funnel_id) we make and the values aren’t matching those in the UI.

curl --request GET \ --url 'https://mixpanel.com/api/2.0/funnels?from_date=2020-09-01&to_date=2020-09-30&interval=1&unit=day' \ --header 'Accept: application/json'

Userlevel 6
Badge +3

@Databox —

I need a little more information to help direct you to an answer, but this is a valuable topic in case others are experiencing similar issues.

How far off are the numbers? It could be the case that the date range is slightly off via cURL compared to how the information is sorted and processed in the UI. If the numbers are close but not identical, I would expect this to be the case. 

 

If the numbers are completely off, then it’s likely a matter of writing an accurate cURL request. If that is the case, can you explain what you are trying to grab from the API?

 

For both scenarios, the QBQ (question behind the question) for me, is why are you grabbing this information from the API? Are you using it in some other form? The power of Mixpanel comes from the UI, so I’d be interested to know why you are trying to hit the endpoint instead of using a Funnels report in the product. Is there a separate way we can approach this to help you achieve what you are looking to do?

Badge

Hi @cherise,

the numbers are quite a bit off, but I believe that the query should be correct.

We use this information so our users are able to create their own dashboards from multiple sources.

Badge

HI @cherise just a follow up if anything new came up.

Userlevel 6
Badge +3

@Databox — Can you explain what you mean by this? 

We use this information so our users are able to create their own dashboards from multiple sources.

 

Would it be possible for you to share a screenshot of the Query Builder of the Funnel that you are trying to replicate?

 

Thanks!

Badge

@Databox — Can you explain what you mean by this? 

We use this information so our users are able to create their own dashboards from multiple sources.

 

Would it be possible for you to share a screenshot of the Query Builder of the Funnel that you are trying to replicate?

 

Thanks!

Of course, here it is.

 

Reply