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 7843287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:30:59+00:00 2026-06-02T16:30:59+00:00

I have a conceptually simple problem involving Google Analytics and Tomcat, but I cannot

  • 0

I have a conceptually simple problem involving Google Analytics and Tomcat, but I cannot solve it.

We have Google Analytics set up for our production machine and it is working fine. I want to set up a Google Analytics account to monitor our test system so I can test various features without affecting/polluting our production data. I have a test system set up, and a test Google Analytics account. However, the test Google Analytics account never receives data from the test system.

From my investigation, it appears that the problem is that my test system is being referred to as “localhost” instead of “test.mycompany.com” and the document.domain property used by Javascript is therefore “localhost” instead of the “test.mycompany.com” URL that it should be. This is causing the Google Analytics cookies to be written incorrectly (I think) and therefore the Google Analytics Javascript code is never sending data to my Google Analytics account.

Is there any way to set this “document.domain” property in Tomcat 6 so that this system will think it is “test.mycompany.com” instead of “localhost”?

I have examined both the Tomcat docs and the Google Analytics docs, but neither of them address this point directly.

Any help would be appreciated.

  • 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-06-02T16:31:00+00:00Added an answer on June 2, 2026 at 4:31 pm

    Open your firewall on the test server so google can access it and use add this in the snipet

    _gaq.push(['_setDomainName', 'none']); //has to be place before _trackPageview
    

    also open your firewall for ga

    https://ssl.google-analytics.com/__utm.gif
    http://www.google-analytics.com/__utm.gif
    

    and

    http://www.google-analytics.com/ga.js
    

    So, port 80 for HTTP, port 443 for HTTPS and the site(s):

    ssl.google-analytics.com
    www.google-analytics.com
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a number of classes that are all related conceptually, but some more-so
Conceptually, I would like to accomplish the following but have had trouble understand how
Conceptually, I would like to accomplish the following but have had trouble understand how
I have a reasonably simple a reasonably system that are conceptually 100,000's of small/simple
I have several somewhat separate programs, that conceptually can fit into a single project.
More of a design/conceptual question. At work the decision was made to have our
have been playing with Cubepoints (wordpress plugin) and have installed the ranks module but
Have a singleton class for BNRItemStore, but when I tried to call it, I
All right. The problem here is pretty abstract. Bear with me. I have a
I'm trying to implement what I think is a fairly simple design. I have

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.