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

  • SEARCH
  • Home
  • 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 6977113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:35:02+00:00 2026-05-27T17:35:02+00:00

On my website I have four custom variables. My issue is that Google Analytics

  • 0

On my website I have four custom variables. My issue is that Google Analytics for some reason is only registering three of them. The script on the page that is not working properly looks like this:

<script type="text/javascript">
    var _gaq = _gaq || [];

    _gaq.push(['_setCustomVar',3,'Category 3','some value']);
    _gaq.push(['_setCustomVar',4,'Category 4','some value']);

    _gaq.push(['_setAccount', 'UA-XXXXXXXX']);
    _gaq.push(['_trackPageview']);

    (function () { 
        var ga = document.createElement('script');
        ga.type = 'text/javascript'; 
        ga.async = true; 
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 
    })();
</script>

This page is supposed to track two of the custom variables in index 3 and 4. Another page is tracking custom variables in index 1 and 2.

In Google Analytics I can see that it has registered the categories in the first three slots (Index 1-3) but the category in the fourth slot never gets registered. According to the documentation you can have up to five slots.

Can anyone shed any light on why the fourth variable never gets registered?

Update

Inspecting the utme variable in the analytics request provided some interesting results.

Page 1, which is working, uses the following tracking script:

_gaq.push(['_setCustomVar',1,'Category 1','value1']);
_gaq.push(['_setCustomVar',2,'Category 2','value2']);

This results in the following utme parameter:

8(Category 1*Category 2)9(value1*value2)

Page 2, which is NOT working, uses the following tracking script:

_gaq.push(['_setCustomVar',3,'Category 3','value3']);
_gaq.push(['_setCustomVar',4,'Category 4','value4']);

This results in the following utme parameter:

8(3!Category 3)9(3!value3)

It’s clearly ignoring the last custom value that I’m trying to track!

  • 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-27T17:35:03+00:00Added an answer on May 27, 2026 at 5:35 pm

    I had trouble getting this to work too and ultimately it was a case of not reading the document carefully enough.

    Not sure if you’re posing the actual code you’re using for setting your variables, if not, make sure you’re in compliance with this warning:

    The total combined length of any custom variable name and value may not exceed 128 bytes. Keep in mind that this is not equivalent to 128 characters. Because names and values are URI encoded when stored, some characters use more than one byte. For example, = is stored as %3D rather than = and uses 3 bytes rather than 1. To get a list of URI encoded values, search the web for URL encoding reference.

    Have you checked the other recommended practices? These two might be a source of problems for you (if you’re using session variables too):

    Do not use duplicate key names across slots.
    You have up to 5 simultaneous custom variables for use in a single request (e.g. pageview or event call).
    The sum of all your custom varaiables cannot exceed 5 in any given request (i.e. you cannot have 5 visitor and 5 session custom variables set simultaneously).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want my website to have a checkbox that users can click so that
In my asp.net-mvc website I have a field that usually has a string (from
Almost every new website seems to have an intro video that tells prospective new
We have developed a system that uses a single code base, consisting of four
I have a website that lets users comment on books and articles, and the
I have been working on a website that has to do with a subscription
I have a solution with four websites in it, when I debug a website
I have a set of four ASP.NET roles that I have been trying to
I'm making a custom portfolio gallery for my website, and I'm having an issue.
i have four differnet data entry users that will be using four different forms

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.