Podio Webforms and Google Analytics Goals

Podio Webforms are a great easy way to get website form completions directly into Podio without any coding. However one important missing feature seems to be the ability to track your Podio Webform completions as Goal Conversions in Google Analytics.

I did a lot of research into this. One of the main issues is that the Podio webform is on a different domain than your website page, and for security, no browser allows access to the content of the iFramed form. This means there's no way to determine if the Podio form has been submitted from your website.

Well, almost none.

In all my experiments, I did notice one thing. When a Podio form is submitted, the resulting page shows the success message. Although there's not way to determine if this message is being displayed, it does create a change in size of the displayed content.

Because this change in size is not triggered by the user changing the browser window size, you can't use an event listener. But with a little piece of JavaScript that runs a few times every second, we're able to trigger an event when this change occurs.

Please note that this solution is by no means elegant or bullet-proof, but it works :-).

Here are the step-by-step instructions:

1) Wrap your Podio Webform in a DIV and give it an ID

<div id="podioform">
[ podio webform code goes here ]
</div>

2) Add the JavaScript below this DIV to trigger the Analytics Goal

<script type="text/javascript">
doc = document.getElementById('podioform');
var timer = setInterval ( function() {
var newheight = doc.offsetHeight;
if (newheight<200) {
_gaq.push(['_trackPageview', '/contact/confirm/']);
clearInterval(timer);
}
}, 250);
</script>

In this example, my Google Analytics Goal is defined as the URL '/contact/confirm/' - which would be the resulting thank-you page under normal (non-Podio) circumstances. You'll need to change this to whatever your Goal URL is defined as.

How does this script work?

The JavaScript timer function runs every 250 milliseconds (4 times per second), and calculates the height of the DIV containing your Podio Webform.

If the height is smaller than 200 pixels, we are assuming that the form has been submitted.

The assumptions are that your Webform is longer than 200 pixels and the thank-you message is shorter. So, make sure that your Podio Webform success message is SHORT.




Andreasby Andreas Huttenrauch
Owner of Globi Web Solutions, and Podio Fanatic.



comments powered by Disqus