Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7081113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:52:47+00:00 2026-05-28T06:52:47+00:00

I enjoy working with Google Analytics and the ways that I am able to

  • 0

I enjoy working with Google Analytics and the ways that I am able to slice information about our visitors. We use Customer Variables to track information about who and how are users interact with our site. Staying true to the goal of Analytics, we are always looking for ways to improve and optimize our website.

Currently we are in a phase of development where we can make choices about how we want to store and present product information. One of the questions that came up was whether or not to show product information in all caps or not. Working with our users for the last few years, it seems that much of our traffic comes from visitors who do have caps lock on. So it got us thinking, could we track our caps lock users with a customer variable to that we can make a more informed determination about how to present the information?

Check out this sample I slapped together: http://jsfiddle.net/shanabus/Za4kL/

Our site basically represents a standard e-commerce site. There are a few different text boxes and that allow you to search for part numbers and throughout the order process there are a few places where users can type text. Would you bind the caps lock test to all text boxes or just the common ones? Is there a performance hit if I bind the keypress listener to all text boxes on the site or is it negligible? Is there a better way to implement this?

I imagine instead of showing/hiding a div I would instead set the custom var:

_gaq.push('_setCustomVar', 5, 'capslock', 'true', 3);

Thanks for any thoughts and consideration on this seemingly trivial topic.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:52:47+00:00Added an answer on May 28, 2026 at 6:52 am

    I’d bind the event globally, and use the following code:

    var CAPS_ON = null;
    $(window).keypress(function(ev) {
        var charCode = ev.which; //jQuery normalizes ev.charCode to ev.which
        // Lowercase chars
        if (charCode >= 97 && charCode <= 122) {
            CAPS_ON = ev.shiftKey; // Caps are off if SHIFT is not pressed
        } else if (charCode >= 65 && charCode <= 90) {
            CAPS_ON = !ev.shiftKey;
        }
    });
    

    This creates a variable CAPS_ON, which can be used throughout the page.

    Further explanation on the code:

    • The event has to be bound to the keypress event, because it’s the only key event which discerns lowercase/uppercase characters.
    • The shiftKey property has to be checked, because it inverts the CAPS LOCK feature.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assume for a moment that one cannot use print (and thus enjoy the benefit
I have a client that wants to use Google Chrome for an internal web
Is there any way that I could enjoy a decodeValue() function in PHP, too?
In our office, we regularly enjoy some rounds of foosball / table football after
I use both ruby on rails and Java. I really enjoy using migrations when
While all of my machines are Macs, I actually really enjoy working in .NET.
I've been working with Magento for a while now and really enjoy developing modules
Something I don't enjoy about programming is learning a new API. For example, right
I enjoy working with WPF but I need a little more of designer's touch
This is a simplified example, but I am working on a code translator that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.