Tracking Forms that Use an iFrame 

 

You’re a savvy digital marketer – competent in Google Tag Manager and a whiz in Google Analytics. And yet you find yourself scratching your head because you just can’t get your form submissions to record in either. After further investigation, you hear something about an iFrame, which is why you’re here. So how do you track form submissions in an iFrame? 

What Is an iFrame? 

An iFrame (or Inline Frame) is a method of imbedding HTML into your website. In other words, an iFrame is a place on your website where you receive code inserted and controlled by another source.  

There are a variety of reasons why people use iFrames. Most often iFrames are used because they’re easy – sometimes companies don’t have a developer to build the functionality they need themselves or the developers they do have are focusing their energy on bigger tasks. 

If you read up on iFrames, you’ll notice there’s a lot of bias against them. Some claim they’re bad for SEO, others say they’re less secure, still others say they’ll for sure break the functionality of your website. It’s true – adding in code from a completely different source does add in more complexity to your website, which increases the possibility to break elements. However, it’s important to remember that the code in your iFrame is only as good as the developer himself. A crappy developer can result in a crappy iFrame. A great developer can result in a great iFrame  

How Can You Tell if Your Form Is in an iFrame? 

For those of you who don’t like looking at code, this step may be a little daunting, but don’t worry – I’ll hold your hand the whole way! Start by right clicking on the page and clicking “view source.” Search for the term “iframe” (without quotation marks). The word “iframe” is literally how you mark up an iframe in the code. If you don’t see the word in your code, do a happy dance – you don’t have an iframe. 

How Do You Track iFrame Forms in Google Analytics? 

I never want to say tracking in an iFrame is impossible, but unless you’ve got a great developer for these next couple of steps, you may want to remove the iFrame altogether and start a new form from scratch.  

The best method for tracking forms in an iFrame is to have your developer modify the CORS (Cross-Origin Resource Sharing). To understand CORS, you’ll have to understand the concept of the same origination policy – the idea that your website puppiesarecuddly.com only accepts requests from puppiesarecuddly.com, and not from bigbadwolfhackersite.com. Makes sense, right? You should only allow a website with the same origination to make the request. By modifying the CORS (remember – cross-origin resource sharing), you’re allowing other domains to access your resources. For example, if our iFrame referenced the website kittiesarecutetoo.com, we would modify the CORS to allow kittiesarecutetoo.com to allow resources from puppiesarecuddly.com. 

Another way is to contact the owner of your iFrame code to see if he or she will allow you to put your Google Analytics code in the iFrame. If they agree, make sure you set up your Google Analytics account to allow for cross-domain tracking. Remember, the iFrame is technically from another source so it will most likely have another domain. Additionally, you’ll want to make sure you’re not firing double pageviews by having your Google Analytics code in the iFrame. 

Summary 

iFrames aren’t evil – but they do make tracking much more difficult, especially without a good developer by your side. Be prepared add your Google Analytics code into the iFrame, modify the CORS or get rid of the iFrame altogether for successful tracking your form submissions. 

 

Stay in the know with email updates!

* indicates required

Why Do I Need To Set Up Goals In Google Analytics?

 

To achieve anything in life, you need to set goals. Google Analytics isn’t any different. By setting up goals in Google Analytics, not only are you making sure that your website KPIs are in line with your business goals, but you’re also making sure that you have clearer insight into the actions a user takes before completing those goals.

Conversion Rates 

You have 4,392 sessions to your website and out of those 4,392 sessions you had 51 sessions where a user signed up for your newsletter. That means your conversion rate is…involving too much math. Luckily for you, when you set up goals in Google Analytics, this conversion rate is automatically calculated for you.

The conversion rate you see in Google Analytics is really beneficial if you’re using a last click or last non-direct click attribution model. Last click or last non-direct click attribution models refers to the last channel or last non-direct channel a user visited before they converted. Last click and last non-direct click models can give you a great idea of which channels are closers, which devices close faster, and more. 

The Multi-Channel Funnel 

If you’re you’re curious to see how people are interacting with you across all channels before converting, then the multi-channel funnel is for you. This report shows more than just which channels are the closers. This report can show you what started someone thinking about your product before they eventually converted. 

The information that you get from the multi-channel funnel report is only available if you enable goals in Google Analytics. Even more gnarly, if you’ve been paying attention to my millions and millions of posts about UTM coding, you can get an idea of how people are interacting with your individual messages across channels.

In my opinion, the multi channel funnel report combined with UTM coding is one of the most valuable aspects of Google Analytics because it tells you what to say to a customer, when to say it, and where to say it. 

Retargeting 

I won’t say the “r” word (retargeting) too loud for fear of the GDPR boogeymen coming to get me in my sleep, but if you’re keeping track of who has completed a goal on your website, you are also by default keeping track of those who have NOT completed a goal on your website. This gives you a great pool for people to re-pitch to, fine-tuning your message and A/B testing to help get a sale. 

Retargeting isn’t only for small conversions. Retargeting can also help you if you have a much bigger product to sell or a much longer sales cycle. By setting up both small and big goals in Google Analytics (for example, sign up for our newsletter and fill out a request for a sales member to contact you), you can retarget those who have completed the smaller goal, as they’re often more likely to complete a larger goal. 

Keeping the same KPIs across Google Ads and Google Analytics 

As the old saying goes, don’t let the fox guard the hen house. By adding goals in Google Analytics and then importing them into Adwords, you can ensure you have the same KPIs (key performance indicators) for both your paid and organic campaigns. 

This isn’t to say that you should always use the same KPIs across every medium. For example, display campaigns, which are mainly used to create awareness and not to convert users, so you would want to measure the success of a display campaigns by looking at the number of impressions. However, an apples to apples comparison may help give you a gut check on the successfulness of any given campaign.

Summary 

Between not having to manually calculate your conversion rates by dividing the number of goal completions over the number of sessions, seeing how users interact across your different marketing mediums, retargeting those who haven’t completed the desired action on your website, and having an apples to apples comparison of success across mediums, goals in Google Analytics are a no brainer. Check on my other posts on how to set up goals, and you’ll be showing the ROI for your marketing efforts in no time. 

 

Stay in the know with email updates!

* indicates required