Responsive design and Google analytics mobile tracking codes?
-
Hi all,
We are currently rebuilding a site using responsive design, however i have just had a thought. On another site where we have a mobile site under a sub-directory we utilise mobile tracking codes as we found that this was far more accurate for recording visits.
On a responsive design site evidently all pages, desktop and mobile, will be under the same URL, yet the content will adjust to the screen size of the device. Should we also change the tracking code to be mobile code on the lower resolutions or would the same code be sufficient?
-
Rich,
Because responsive design inherently only uses one html file, what you're describing isn't so simple. Obviously, you only want to include 1 GA tracking code, but you COULD include some logic that fires a different one on page load depending on detected screen width. I think your best bet is to just use the standard GA code in your HTML, then include some JS that detects which of the layouts are displayed on load, and sends it in a custom variable. Alternatively, GA, by default, will capture screen size as a data point, so, as long as your responsiveness is working properly, you can just create segments in GA based on those and view site behavior accordingly.
Mike
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
-
How does Google rank a "Site:yourexamplesite.com" Query
Hi All, Sorry for the potentially confusing title. I am trying to find out how google ranks the pages of your site when you search "site:yourwebsite.com". When I did this with my website I was surprised what pages showed up on the first page, there were sub-category pages in the top 5 results and top level category pages that weren't on the first page. I have been unable to find information as to how google returns these results, is it the same algorithm/factors that make pages rank highly in a regular search, or does it have something to do with how recently google crawled these pages. Any feedback would be helpful. Additionally, if anyone has worked through a similar scenario I would be interested to know if there were any insights you gained from finding out which of your pages google returned first. Thanks for the help! Jason
Web Design | | Jason-Reid0 -
AMP vs Responsive Design? Mobile SEO
Hello !! We are developing a new website with responsive design. As is recommended, the idea would be to have a unique site for mobile and desktop, with same content and same url for both devices, using responsive design to adapt the layout depending on the device. My doubt in here is about the AMP pages? If my website has responsive design, perfectly optimized for mobile do I need somehow AMP pages? As far as I understand, these amp pages would be useful if I had different pages for mobile, but this is not the case. Am I correct or am I missing something? Thanks for your help :
Web Design | | AutoEurope1 -
Lost Rankings Late April Even Though We Have A Mobile Site
I have noticed a significant drop in rankings since late April. It is about a 30% drop in organic from Google. This is despite the fact that we launched a mobile site before the update. What gives? Any thoughts or suggestions would be appreciated.
Web Design | | inhouseseo0 -
Going mobile: Responsive or different mobile version?
Going mobile: Responsive or different mobile version?
Web Design | | FCRMediaLietuva
Which one should we choose? Should we do responsive design or should we have a different mobile version and go m.domain.com ? http://searchenginewatch.com/sew/how-to/2253965/3-reasons-why-responsive-web-design-is-the-best-option-for-your-mobile-seo-strategy I just read this article. It seems that the responsive design is OK, but the first comment kills that opinion and says that it is pretty hard to make it OK. 🙂 So I need more opinions? What is best for people and for SEO?0 -
Does Google count the domain name in its 115-character "ideal" URL length?
I've been following various threads having to do with URL length and Google's happiness therewith and have yet to find an answer to the question posed in the title. Some answers and discussions have come close, but none I've found have addressed this with any specificity. Here are four hypothetical URLs of varying lengths and configurations: EXAMPLE ONE:
Web Design | | RScime25
my-big-widgets-are-the-best-widgets-in-the-world-and-come-in-many-vibrant-and-unique-colors-and-configurations.html (115 characters) EXAMPLE TWO: sample.com/my-big-widgets-are-the-best-widgets-in-the-world-and-come-in-many-vibrant-and-unique-colors-and-configurations.html (126 characters) EXAMPLE THREE: www.sample.com/my-big-widgets-are-the-best-widgets-in-the-world-and-come-in-many-vibrant-and-unique-colors-and-configurations.html (130 characters) EXAMPLE FOUR: http://www.sample.com/my-big-widgets-are-the-best-widgets-in-the-world-and-come-in-many-vibrant-and-unique-colors-and-configurations.html (137 characters) Assuming the examples contain appropriate keywords and are linked to appropriate anchor text (etc.,) how would Google look upon each? All I've been able to garner thus far is that URLs should be as short as possible while still containing and contextualizing keywords. I have 500+ URLs to review for the company I work for and could use some guidance; yes, I know I should test, but testing is problematical to the extreme; I look to the collective/accumulated wisdom of the MOZVerse for help. Thanks.1 -
Am I on the right track -- still not seeing results in rank, traffic, etc.
I am a complete novice, but I tend to learn quickly. My site is one year old, and I have very low traffic. I also rank poorly. I have recently learned a ton, and made some changes: 1. Put in meta no follow, no index tags on certain pages 2. Found and fixed some horrid content -- I had forgotten to finish certain pages (!) and they had been left up for months -- a good example is /California-homeschool.html basically said "Washington homeschool, blah, blah, blah" for about 8 months before I fixed it (!) 3. Added new content, changed the look and navigation of the site, added social media links and have been working to build those up (FB, Twitter, etc) 4. Started blogging regularly. Those are the main things I have done. I plan to continue to add content, tweak the navigation, and blog regularly. From what I can tell, link building should happen organically. My question is: Am I on the right track? Here is a link to my site: http://www.i-school-at-home.com Am I missing anything -- there seems to be so much info out there. Because there is a time lag between making changes and seeing results, I just would love to know if I am on the right track, before I devote more time to this strategy. What I would like to do is be the #1 homeschool website (long term goal) and generate revenue (eventually) from affiliate marketing and creating my own curriculum and resources. Thank you!!!!!!
Web Design | | WendyKKelly0 -
Coding a WordPress shopping cart
I have searched high and low for a light, simple to use Wordpress shopping cart plugin which can use custom templates and work with the transporter and payment gateway i'd like. Unfortunately i haven't found anything. I am currently looking for an example, maybe a tutorial somewhere but can't seem to find anything online, all i can find are advertisements for existing plugins. Can anyone help my any further? I know it's not an SEO related question but i'm out of ideas.
Web Design | | ldestrooper0