Sitecore Analytics and Google Query URL Structure

We noticed that our Sitecore analytics reports seemed off in terms of how much search traffic we were getting. For some reason, Sitecore was not registering traffic coming from Google as search traffic. This is bad for many reasons; Google is pretty popular, so not having an accurate read on the traffic to a website can cause major problems.

Sitecore Analytics Google Query

After some digging through the Analytics pipelines, it turned out that Sitecore was expecting a Google search referral to look like this: www.google.com/?q=keywords

But when I visit Google and perform a search, the resulting URL is: https://www.google.com/#q=keywords

As you can see, it’s a small change with a big impact. With that URL as referral, Sitecore fails to parse keywords out, and therefore does not register the referral as Search traffic type.

It seems at some point Google changed the URL structure for queries, and Sitecore needs to be updated accordingly.

I added this additional processor to the <parseReferrers> pipeline after the existing ParseGenericSearchEngine.

Sitecore Analytics Additional processor

With this change, keywords will be parsed and assigned to the Interaction, which will get picked up by the <trafficType> pipeline and it will in turn recognize the referrer as search traffic.

These changes will reflect in the Online channels and Keywords reports in Sitecore.

  • What version of Sitecore are you noticing this on? Have you tested any other versions (assuming you’re not already on the latest)? Where’s the code that goes behind Hedgehog.SitecoreExtensions.Pipelines.ParseReferrer.ParseCustomSearchEngine?

  • Google removes the search keyword from referrer. How come it works for you?
    Traffic will get associated with google organic search, but there is no keyword coming to Sitecore.

    • Thanks for pointing that out! I didn’t realize Google was doing that, and the above findings were based on what I saw Sitecore was parsing to classify search traffic. My tests were using simulated referrer traffic.

      From what I can see, without keywords, traffic does not get associated with organic search. I will post more findings as I continue to dig into this! – Elena


Leave a Comment

HedgeBlog is the blog of Hedgehog, a full-service digital agency. It's our fresh take on what's new, what's now, what's next in technology, online media, and beyond. Drop by, chime in, and be inspired.


  • This field is for validation purposes and should be left unchanged.