Solved

Engage API is giving more results than it should

  • 19 February 2021
  • 1 reply
  • 24 views

Hello, my name is Marcelo and I'm developing an API to connect my company's Mixpanel data to Google ADS. However, the results I'm getting from the API are confusing me.

This is the code I'm running to extract the data and I'll explain where the inconsistency is. (I’ve removed the imports and the token variable).

 

Looking at the next image you can see that I’m getting (correctly, I've checked) the total number of results to the cohort I've passed.

 

 

However, if you look at the image bellow, at the middle right corner, you'll notice that there are 12.000 ids in the final JSON, which means I'm receiving 1.000 results per page. The problem is, in the last page (page 11) I should only receive the remaining results, in this case, there were 272 of them, given that in total there were 11272 results.

 

Zooming it:

 

I don't know if there is a problem in the code or if the API itself is the problem.

Also, I'm not only receiving the "output_properties" I've passed, but that is more probable to be caused by some mistake in the code, I'll make more tests on that.

Hope you can help me :)
Thanks!

 

 

icon

Best answer by MarceloB 1 March 2021, 13:18

I solved it. There was a problem in the python algorithm, I was increasing the page to 1, nevertheless, not adding the payload to the request BEFORE sending it,  therefore I was sending a request to page zero 2 times.

View original

1 reply

I solved it. There was a problem in the python algorithm, I was increasing the page to 1, nevertheless, not adding the payload to the request BEFORE sending it,  therefore I was sending a request to page zero 2 times.

Reply


Mixpanel