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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:35:40+00:00 2026-05-26T15:35:40+00:00

My profiles on google analytics is http://example.com (don’t have www ). And this script

  • 0

My profiles on google analytics is http://example.com (don’t have www ). And this script on my site :

                        var _gaq = _gaq || [];
                          _gaq.push(['_setAccount', 'UA-xxxxx-2']);
                          _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);
                          })();

Google Analytics will count view from subdomain.example.com ?

And a other question i want free google analytics ‘s cookies from static.example.com . I tried put _gaq.push(['_setDomainName', 'example.com']); But still see cookies on images from static.example.com on firebug.

  • 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-26T15:35:41+00:00Added an answer on May 26, 2026 at 3:35 pm

    If you have subdomains you should use the following code on every one of them:

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-xxxxx-2']);
    _gaq.push(['_setDomainName', '.example.com']);
    _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);
    })();
    

    But note that this will cause the cookies to be sent to the static subdomain as well. The best way to isolate the static domain is to have it as a different domain, not as a different subdomain. If you store the GA cookies on the full domain instead of the top domain you will clear the static domain but it will be much harder to correctly setup GA.

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

Sidebar

Related Questions

Basically I have a public feed: http://www.google.com/latitude/apps/badge/api?user=-1671995934285587708&type=atom If you go to my Google Profile
I am using google analytics and have a filter for one of the websites
Using garb (http://github.com/vigetlabs/garb) i need to fetch the same Map Overlay XML, like Google
I'd like to have better error page reporting in Google Analytics. Currently, if someone
Take my profile for example, or any question number of views on this site,
I finally wrote a script to get Google Analytics data then insert it into
Now when google have changed their profiles in the last couple of days I
Does The StackExchange MiniProfiler http://code.google.com/p/mvc-mini-profiler/ work in ASP.NET MVC2? If so, how? When adding
I have a modeling question related to profiles. Firstly, I have looked into using
I'm trying to use ASP.net profiles I've followed some instructions which means 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.