Mobile redirect causing traffic drop? Can I move analytics code to capture them as visitors before redirecting them?
-
Yesterday I implemented a mobile redirect as I don't have a mobile version of my site. As a result I've seen a drop in traffic which makes sense as my redirect script is at the top of the page. If I were to move the redirect script below the analytics code would that allow me to still track mobile users? Would this affect my bounce rate though?
-
Yes, the "drop" in traffic (or drop in reported traffic) is because the analytics code doesn't have time to kick in before the redirect script takes over.
If you were to move the refresh script to the bottom of the code and the analytics to the top, the likelihood of reversing this goes up. We had a similar problem with a client site in that they had a very heavy piece of conversion optimisation software running at the top of the code and our tracking code at the bottom. Users clicking from search to the home page usually knew where they wanted to go quite quickly, and would click away before our tracking code had loaded. Client was desperate to know why our SEO traffic had gone through the floor. It had not. We had them reverse the analytics and CRO codes and our traffic "came back".
JS is executed in the order it's included in the code, so moving it should work. Should being the key word - I am not 100% on this.
I am not sure how to place a delay with JS so hopefully someone else can chime in on that one. Meta refreshes allow a short time delay - does anyone know what the correct way to do this for solely mobile traffic would be? Acknowledging that meta refreshes are not recommended for SEO, but they are a popular way of defining a short delay in redirecting a user.
-
The mobile site is not operated by me unfortunately.
-
Why you not add the analytics code to the mobile site too? The actual market of mobile phones runs JS without problems.
-
Uh, hard to say as you need to do it in the script you're including ;-). Can you send me the URL of the JS (or via PM, whatever you prefer)?
-
Thanks for your reply. How would I add a delay to this code?
-
Hi Sam,
If you're doing the redirect with a JavaScript solution then the answer would be yes. Put you would need a delay of 1-2 seconds to make sure the GA tracking code is initialized.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
If website users don't accept GDPR cookie consent, does that prevent GA-GTM from tracking pageviews and any traffic from that user that would cause significant traffic decreases?
I've been doing a lot research on GDPR impact and implementation with GTM-GA for clients, but it's been 12 months since GDPR has gone live I haven't found anything on how GA traffic has been impacted if users don't accept cookie consent. However, I'm personally seeing GA accounts taking huge losses in traffic since implementing GDPR cookie solutions (because GTM/GA tags aren't firing until cookies are accepted). Is it common for websites to see significant decreases in traffic due to too many users not accepting cookie consent? Are there alternative solutions to avoid traffic loss like that and still maintain GDPR compliance? It seems to me that the industry underestimated how many people won't accept cookie consent. Most of the documentation and articles around GDPR's start (May 2018) didn't foresee or cover that aspect properly, everything seems to be technically focused with the assumption that if implemented properly most people would accept cookie consent, but I'm personally not seeing that trend and it's destroying GA data (lost traffic, minimal source attribution, inaccurate behavior data, etc). Thanks.
Reporting & Analytics | | Kickboard2 -
% Change - Google analytics - how to calculate?
Hi All,
Reporting & Analytics | | JohnPalmer
I have two dates with two different numbers I want to calculate the "% Change" like google analytics, The numbers of June 2015 - 127,931 sessions
The numbers of June 2014 - 90914 sessions please tell me what is the %Change. Best. J0 -
Referral Traffic from Google
Hello, I have a question about my company's new website. I've worked in SEO and studied Google Analytics results for a few years now but have never really come across something like this. I started in this position in January of this year and when I started breaking down the traffic sources in Google Analytics, I noticed most of the traffic was coming from Google.com as a referral source. I had never seen Google.com as a referral source before so I looked into options for what it could be. It was not a paid ad and our organic traffic was coming through in Analytics, Before I could get any further, our new website was launched (we switched CRM's to WordPress) and the referral traffic from google went from 2,966 in January of 2015 to 22 in February 2015. for more comparison, in February of 2014, the referral traffic from Google was 2,496. I expected a drop when we switched CRM's but we correctly re-directed all pages and created a new sitemap and our organic traffic is up since the switch (not enough to cover drop in referral). I thought at first this had to do with our Google sellers account being de-activated when we made the switch, but I quickly fixed this over a month ago and no change. I'm wondering if anyone has ever seen Google.com come through as a referral source in Google Analytics and if they we're able to figure out what it actually was. This would be a great help! Thank you, Alex
Reporting & Analytics | | RASEO1 -
Redirect 301
Hello, Case study:
Reporting & Analytics | | Shanaki
I changed all the links from an online store as follows: Before: www.domain.com/store1/category/product (link to a product, in magento e-commerce)
After: www.domain.com/category/product (link to a product). Basically I removed the stores, and made 1 default / base store, and put a 301 redirect (from .htacces). My question is:
1. How bad i broke the seo, cause i was no.1 on 30 keywords with these structure of links, and these kinds of link had page rank 2-3.
2. Does redirect 301 from old link, transfer the Page rank?
3. I should modify all link from link building to the new link? I mean urgent?
4. Does google will reindex the keywords with the new links? Thank you in advance.
With respect,
Shanaki0 -
Visitor Hours
Just a quickie.... I know that this was possible in the previous incarnation of Google Analytics, but I cant fathom how to do to it now on the most recent version. How can I see when the mos popular visitor times were on my website? I.e. a graph that shows a 24 hour clock over any given time frame
Reporting & Analytics | | DHS_SH0 -
Google Analytics and DNS change
Our new alumni application is going be tested at domain uva.imodules.com . We are going to collect traffic data with a Google analytics account number UA-884652-XX. So going to uva.imodules.com/myPage.html would send its data to Google Analytics with that account number. Then when it is ready for production we are going to just change the domain name of the application and switch the DNS over to dardencommunity.darden.virginia.edu . So going to dardencommunity.darden.virginia.edu /myPage.html would send its data to Google Analtics with that SAME account number. Aside from having the testing domain data in the same profile are there any other issues/problems we may run into?
Reporting & Analytics | | Darden0 -
How long after a redirect should we see results?
In mid September we had to so some redirects from old URL's to new URL's. We haven't seen a significant jump in traffic so we are wondering how long this might take before we see a change. We are the brand so we should be getting some sort of authority from Google, yes? Any tips that can be offered would be grateful as we are stumped.
Reporting & Analytics | | K2_Sports0 -
Google Analytics Tracking Code Queries
Hello, I have taken on a new client who has Google Analytics installed. The tracking code is set to 'single domain'. Recently they added a mobile site using a sub-domain (m.website.com) which means that Google Analytics is not picking up this traffic. I want to revise the account so that I have a master account (raw data) and then profiles for the mobile site, main domain (www.website.com) and one other for a sub-domain that they are using. I am aware that there is mobile specific tracking code however I thought it would be easier (re conversions/goals/eCommerce tracking) to not use this and by changing the account to 'multiple domains' we could also get data for another sub-domain that they are using . My questions are: Am I right to want to use individual profiles over web properties. If not please explain why. When installing the tracking code (where the profile number is changing) I believe that I need to add that code with the changing profile number to the sub-domain sections. So my question is a) is that correct, and b) if I use a profile number on a sub-domain section will the master account still gather the data for the main URL as well as all sub-domains. If I change the master account from using 'single domain' tracking code to 'multiple domain' tracking code will this affect historical data? Will I lose the data? When changing from 'single domain' tracking to 'multiple domain' tracking does this affect eCommerce tracking? Or do we only need to be adding the additional lines of tracking code that allow sub-domains to be tracked? The web developers are using asynchronous code however half is in the and the other half is at the bottom of the source code. Given that traffic is being reported in the Google Analytics account should I have any concerns that the code is split? I have done a lot of reading but seem to be going around in circles, so your help is much appreciated! Thanks,
Reporting & Analytics | | Unity
Dinny0