Page Visits Funnel: Why do the numbers not add up?

Hi there
I was wondering about the relationship between the numbers.

I understand that num of visits = num of cart + num of no_cart.
However after I calculate the num of visits (after the merge) as 2052, num of no_cart as 1652, I got 162 when calculating the num of the people putting stuff in the cart (in step 6). Shouldn’t it be 400 (2052-1652)?

When I went back to check len(visits), it came out as 2000, which is even more confusing. When calculating the num of visits, I used left merge, which includes all the data in visits. How can the numbers be different?

This is my code. I would really appreiciate the help!

1 Like


I had the same problem. I decided to calculate the percentage of visitors who don’t click thru to the carts by using the length of the visits table itself. It made sense to me that this would be the same length as the left join table of visits and cart. But that is not the case! I checked out the data in both the visits table and the merged table and found that a unique user might have several entries in the merged table. I believe this results from a user putting more than one item in their cart in a single visit. This explains the difference in size between the visits table and the merged table. So not anything that you’ve done wrong! And your code looks fine to me. It does find the percentages that they found in the help video.

The problem that I have is the difference in the percentage calculation itself. Isn’t it more accurate to only count the UNIQUE users for the percentage? But taking that into account means also only counting the cart click thrus for the first item placed into the cart for each user. In my mind, the funnel would be incorrect if it allowed counting multiple items from single users (as it does in the walkthru code example).

If anyone knows why one way is better than the other, I would love to hear it!