Market Research

Better SEO Data By Filling in “Not Provided” Results

Christian Vanek
4 min read

As a business owner I occasionally wonder if Google is a valued partner or a hated foe. More and more it seems to be leaning toward the latter.

For example, half of my time spent marketing recently has been trying to appease the “Google Beast” (that’s my nick name for Google), rather than writing great content or optimizing our visitor’s user experience.

Google says it would prefer I spend my time writing and optimizing experiences, but I don’t think they really mean that.

If they did, they wouldn’t have taken away valuable information I need to make content choices for my website – the keywords our visitors use to find our website!

Instead, all we get is “(Not Provided)” for over 60% of our search terms! (It’s not this bad for everyone).

A Solution to the Problem!

It occurred to me last week, that if Google won’t give me the keywords why don’t I just ask for them instead!

So I wrote a nifty little script that can be used on any website to re-capture missing keywords from Google and toss them back into Google Analytics.

Survey to collect keywords that would otherwise come into Google Analytics as "Not Provided"

Adding the code snippet below to bottom of your site’s HTML will popup a small “survey” in the corner of your visitor’s screen if they come from a Google Search and are lacking keyword data.

If they complete the survey, the script sends the keywords back to Google Analytics as part of a custom event, there by adding them to the organic keywords that it already collects!

Example Keyword Data from Google Analytics (Not Provided)

The nice thing about this solution is it’s free, easy and doesn’t require an account with SurveyGizmo (although you can still signup if you’d like). 😉

Here’s the Code

Instructions: Place this code (everything between the script tags — including them) in the footer of your website (after all other content). The survey will begin immediately for new visitors to your site from Google.

<script type="text/javascript"> var __sg_np_tool_percentage_np_visitors = 100; //ask 100% of visitors that lack Google keywords (function() { var ganp = document.createElement('script'); ganp.type = 'text/javascript'; ganp.async = true; ganp.src = '//'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ganp, s); })(); </script>

The “Features”:

  • The survey only appears if the visitor is from Google and has no search keywords.
  • The script posts an event if they complete called “NotProvided Survey”.
  • A visitor will be cookied when the form closes, so they’ll never be asked again.

Note: The script doesn’t send the data to a third party, it’s free and it only requires that you use Google Analytics.

The tool does include a link to this article (it’s a nofollow link) — but if you’d like to hide it you can use CSS to do so in your style sheet!

Here’s the CSS to hide it:

.sg_np_infolink { display: none; }

Of course I hope you’ll find this tool useful and spread the use of this tool by leaving the link in — but it’s totally up to you.

Comments, Suggestions, Requests?

If you’d like me to make changes to the script, just let me know. That’s the benefit of hosting the script on the cloud (the code above just loads it)…

If we fix something or tweak it, everyone get’s the benefit!


Start making smarter decisions

Start a free 7-day trial or speak with a member of our sales team.

Start a free trial