I have a Google Analytics account with a well-functioning funnel made up of 4 goals. I can query the API and get the data out, but it does not match the funnel report in Analytics. Without getting into specific values, I can give you an example with faked data.

Here's how the funnel might look:

Shopping Cart
100 > 100 > 20
       80 (80%)

Address Page
5   >  85 > 25
       60 (71%)

Payment Page
2   >  62 > 10
       52 (84%)

1   >  53
      (49.07% funnel conversion rate)

Okay, so you would expect the API to output data something like this:

goal1Starts goal1Completions goal1Abandons
100         80               20

goal2Starts goal2Completions goal2Abandons
85          60               25

goal3Starts goal3Completions goal3Abandons
62          52               10

goal4Starts goal4Completions goal4Abandons
53          53               0

Instead, it's different. Firstly, the abandons are associated with the following goal (so goal1 always has 0 abandons and goal4 always has >0 abandons. Okay, I can work with that. What's confusing is that the numbers are always a little different. The goal1Completions always match the report, as do the goal4Completions, but everything else is off by a small amount. Sometimes it's only 2 visits, other times it's off by 50.

For the report above here's the kind of results I would tend to get:

goal1Starts goal1Completions goal1Abandons
100         100              0

goal2Starts goal2Completions goal2Abandons
105         84               21

goal3Starts goal3Completions goal3Abandons
90          65               25

goal4Starts goal4Completions goal4Abandons
58          53               5

Here's what I know:

Goal(n)Completions + Goal(n)Abandons = Goal(n)Starts

Goal(n)Starts >= Goal(n-1)Completions

Goal(n)Starts - Goal(n-1)Completions != reported number entering at that level

That third one is particularly disappointing. So, here's my question:

What data do I need to pull from the API in order to recreate the counts in the Funnel report in Google Analytics? I don't need the pages exited to entering from - just the counts at every level.

1 Answer 1


You might get confused with goals and funnels here.

A funnel means a "path" a visitor must follow, if a user does not start at step 1, it is not in the funnel

A goal is just "smaller", a simple action/url visit can be a goal.

So a funnel can consist of multiple "goals"

With the API, as far as i can see, you just get goal information, which is different from the funnel view in analytics.

What if someone completes goal1 without finishing / going to goal2?

So if you just get the goal information, you have to view it per goal, not per funnel. The funnel values can only be calculated if you know how many visitors completed goal1 AND goal2. Which is not the information you have.


Shopping cart visited => goal 1

If 100 users open this page, you get 100 goal completes.

But how many visitors from this pages, also finished goal 2? You don't have this information, since you just get "105" users started this goal (which could be, visit the address page), where goal finish is "submit the page". In this case you get 84 ppl submitting the form, and 21 just "exiting"

The next step would be "6" people entering this page + 84 who finished.


Depending on how the goals are set, how users get to your page (back button in browser, multiple times between 2 steps etc.), your "goals" in between can get more visits (and thus more goal completes) than you would expect.

Off course the last step (last goal) (the checkout) is always correct... i don't know a lot of people ordering the same basket 3 times.

Hopefully this long answer makes it a bit more clear...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.