In short
Why does Google Analytics miss leads from a form embedded on my website?
An embedded form runs in a frame that your Google Analytics tag cannot see into, ad blockers stop the tag for some visitors, and many embedded forms never load a thank-you page to count. Counting the lead from a server fixes the missed ones. It does not say which visit or ad brought the visitor, unless the browser hands that over.
On this page
Google Analytics misses leads from an embedded form for three reasons. The form sits in a frame your tag cannot see into. Some visitors block the tag. And the usual way to count a form fill, a thank-you page, often does not exist for an embedded form.
If you run ads, this matters more than it sounds. Google Analytics shows how many leads came in and which campaign sent them. When it misses leads, your best campaign can look like your worst.
Why does the frame hide the visit?
Most embedded forms are an iframe: a small page from another company's address, shown inside yours. The visitor sees one page. The browser sees two.
Your Google Analytics tag lives on the outer page. It knows who the visitor is, because it set a cookie on your site and read where they came from. It also knows which ad they clicked. What the visitor does inside the frame happens on a different site, and your tag cannot see it.
You might think the answer is to put a Google Analytics tag inside the form. It does not work well. A tag in the frame runs as a different page on a different site. It does not have your site's cookie. Browsers also limit cookies set from inside a frame on another site. So the tag counts the visitor as a stranger, on a page you do not recognize.
The fix that works is for the form to tell your page. A frame can send a message to the page around it, and your page can then count the lead as part of the visit it already knows about. That takes code on both sides, which is why most embedded forms do not do it.
What do ad blockers change?
Ad blockers and some browsers block Google Analytics for a share of visitors. I won't guess how big that share is for you, because it depends on who your visitors are.
A blocked visit never reaches Google Analytics. A lead counted from the browser is blocked with it. The visitor still filled in your form, and you still got the lead in your inbox.
So when a number of leads seems low, the blocker is a likely cause, and it hides in the gap between the leads in your inbox and the leads in your reports.
What if there is no thank-you page?
Many sites count a form fill by loading a thank-you page, then telling Google Analytics that page is the goal. It is a good method for a plain form, which sends the visitor to a new page when it finishes.
An embedded form often does not. It shows its thanks inside the frame, and your page's address never changes. A conversational form never had a thank-you page to begin with, because a conversation just ends.
Then there is the visitor who leaves early. If the count waits for a thank-you page, anyone who closes the tab on the way to it is lost. They filled in the form. You have their lead. Your reports say nothing happened.
What does counting from a server fix?
A server can count the lead without a browser at all. When the form finishes, the company that runs it sends Google Analytics a lead event directly, using Google's Measurement Protocol. The visitor's browser takes no part.
This fixes the three problems above:
- The frame does not matter. The form's own server knows when a lead finishes.
- Ad blockers do not matter. Nothing runs in the visitor's browser to block.
- No thank-you page is needed. The event goes out when the conversation ends, not when a page loads.
It also counts leads that come in somewhere other than your site, such as the form's direct link in an email signature or behind a QR code.
Qualiform does this. Each finished conversation sends one generate_lead event to your Google Analytics property from Qualiform's server. It still counts when a visitor blocks ads or uses the form's direct link. The setup guide has the steps.
What can a server not fix?
It loses the visit. That is the part that surprises people.
A server that sends a lead event on its own does not know which visitor it is talking about. Google Analytics ties an event to a visit with two IDs the browser holds. Without them, Google Analytics records the lead as its own new user. The lead is counted, but not credited to the ad or search that brought the visitor, so your campaign report still shows nothing for it.
Google's own help for the Measurement Protocol says it is designed to add to events collected in the browser, not to replace them, and that sending events without that link gives only partial reporting.
So the real answer has two halves. A server catches every lead. The browser holds the visit. To get both, the browser has to hand its IDs to the form, and the form has to pass them on to the server.
Qualiform does that when you use both of its Google Analytics connections on the same property. A line of code on your own page reads the visitor's Google Analytics IDs and hands them to the form. Qualiform's server then sends the one lead event with those IDs, and the browser tag sends none of its own, so the lead is not counted twice. The lead is counted once and credited to the visit and the ad. If the visitor has blocked Google Analytics, there are no IDs to hand over, and the server still counts the lead, as its own user without the visit.
That last case is the honest limit. You cannot credit a lead to a visit that Google Analytics never saw.
What should you check on your own form?
Whatever form you use, ask three questions:
- Where does the form run? If it is in a frame from another site, a tag on your page cannot see into it.
- What counts the lead? A thank-you page, a tag in the frame, a message to your page, or a server. Each fails in a different way.
- Can it hand the visit over? A server that cannot gets you a lead count and no campaign.
Then test it. Fill in your own form on your live site, and open Google Analytics, then Reports, then Realtime. If the lead is not there within a minute or so, nothing is counting it.
Do the same test once with an ad blocker on. If the lead shows up with no blocker and vanishes with one, you now know how much of your count rests on the browser.
If you pick a form because it embeds easily, find out how it reports leads before you start paying for traffic. The answer is cheaper to learn before the first ad runs than after. Once the leads are counted, the next problem is that every one of them counts the same. The post on tracking lead quality in Google Analytics, not just lead count covers that.
Common questions
Does Google Analytics track forms inside an iframe?
Not by itself. A tag on your page cannot see what happens inside a frame from another site. A tag placed inside the frame runs as a different site, without your site's cookie, so it counts the visitor as someone new. The frame has to tell your page, or a server has to do the counting.
Does an ad blocker stop Google Analytics from counting a lead?
For the browser tag, yes. A visitor whose browser blocks Google Analytics sends it nothing, so a lead from that visitor is missing. A server can still count the lead, but without the visit it came from.
Do you need a thank-you page to count form leads?
No. A thank-you page is one way to count them, and it fails when the form shows its thanks inside the frame or the visitor closes the tab first. Sending a lead event when the form finishes works without one.