Blog

Google Analytics Warning: Lower-Than-Expected Number of Sessions

February 17, 2015 0 Comment

In one of the premium forums I am a member of, someone recently asked this question.

They were getting a warning in their Google Analytics account:

“The Ad Destination URL *** from the AdWords account *************** has accrued a significant number of clicks but a lower-than-expected number of sessions from mobile clients because the page is dropping or altering the gclid parameter inserted by Google. Check the web server’s redirect logic or its use of a URL rewrite engine to ensure the gclid parameter is preserved.”

They contacted Google Support and the reply was to read the solution here.

I checked their site (homepage) and found a Javascript code which was detecting if the visitor is coming from a mobile device. If yes, then the visitor was redirected to http://www.domain.com/mobile/

In Adwords, their auto-tagging was on which means in your Adwords ads, Google appends a ‘gclid’ parameter value which is used to sync Google Analytics data with Adwords data. So let’s suppose if your Adwords ad destination URL is http://www.domain.com/, Adwords will append a random value and Google Analytics will see that value and use that to understand that the click came from Adwords and would also get you additional data in Google Analytics.

So the user ends up going to a URL like this one: http://www.domain.com/?gclid=asdfgh123435

This works fine for Desktop users. But when someone comes from mobile, their server redirects this URL (containing the gclid parameter) to this one: http://www.domain.com/mobile/

Hence, the gclid value gets lost and Google Analytics cannot interpret the visit as it should. That was the reason for that warning in GA.

The Solution:

The long-term ideal solution maybe to have a responsive site but you may have reasons not to have a responsive site.

Another solution is to change the Javascript code so that it preserves the gclid parameter. In their case, they had this JS code:

if (is_mobile) { location.replace('http://www.domain.com/mobile/')}

You may try this one:

if (is_mobile) {
var current_url = document.URL;
var url = "http://www.domain.com/mobile/";
var temp = current_url.split('?');
if(temp[1]){
url = url+"?"+temp[1];
}
location.replace(url);
}

Another solution can be to create separate ads for mobile targeting and then use the final mobile URL as the destination URL. Then set this ad’s Device Preference to Mobile:

Setting Device Preference Mobile in Adwords ad

For details on Adwords auto-tagging, here are some official resources from Google itself:
What auto-tagging is
More about auto-tagging
Benefits of auto-tagging
Tagging your Adwords destination URLs
Check if Adwords auto-tagging works

Thanks!

February 17, 2015 0 Comment

As this is my first post on the blog, I would like to thank all those who made it possible. First & foremost, I thank God for all his blessings & I attribute all my success to him (and my failures to myself). I also thank our Holy Prophet (peace be upon him) for his teachings led me to the path of honesty & integrity which are the core values of our company. And I thank my parents, family & friends for their support throughout my life.

I was into content writing & research before I came into the field of SEO. It was a client who asked for content about SEO and then I got to learn more about it & liked what I learned. The most obvious initial learning resource for SEO, even now, is MOZ (then SEOMoz). Their Ranking Factors survey was an ideal starting point. I found the contributors to that survey and started following them. The writings of the following helped me significantly in learning SEO and beyond:

  • Aaron Wall
  • David Naylor
  • Michael Gray
  • Rae Hoffman (aka SugarRae)
  • Rand Fishkin
  • Ralph Tegtmeier (aka FantoMaster)
  • Dan Thies
  • Leslie Rohde
  • Bob Massa
  • Jason Duke
  • Justin Cutroni
  • Caleb Whitmore

And the list goes on.

I am also thankful to all the clients I had. I can surely say I learned a lot from each of them. And they all gave me an opportunity to grow with them, especially GoodTherapy & BensProstate. It’s been a very good learning experience and that never ends! But now I feel it’s time for me to share all that learning with others, hence the launching of this blog.