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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:22:37+00:00 2026-05-15T14:22:37+00:00

This is barely even a question, I’d just like someone to confirm this for

  • 0

This is barely even a question, I’d just like someone to confirm this for me! 🙂

Google Analytics has generated my tracking code for the subdomain sub.mysite.com. A line of the tracking code looks like this:

_gaq.push(['_setDomainName', '.mysite.com']);

Do I need to change .mysite.com to sub.mysite.com? The tracking code page auto generates instructions for cases like these, but it mentions nothing about actually configuring it. I mean, does it detect the subdomain automatically, or am I being thick?

Cheers!

Jack

  • 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-15T14:22:38+00:00Added an answer on May 15, 2026 at 2:22 pm

    _gaq.push(['_setDomainName', '.mysite.com']); (note the . before mysite.com) causes the tracking to take place on all subdomains of mysite.com. See the documentation for _setDomainName in the Google Analytics Tracker API.

    If you only want to enable tracking for sub.mysite.com, you can just use this instead:

    _gaq.push(['_setDomainName', 'sub.mysite.com']);
    

    P.S. You might also be interested in my post on optimizing the asynchronous Google Analytics snippet in terms of byte size and performance.

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

Sidebar

Related Questions

Sorry this is a basic question, but all my research just barely missed answering
This might seem like a stupid question I admit. But I'm in a small
Note: This might seem like a Super User question at first, but please read
Morning y'all This is probably an easy one but I barely got any sleep
This is a difficult and open-ended question I know, but I thought I'd throw
This error just started popping up all over our site. Permission denied to call
I've barely/rarely used C++ in the past decade, and now it looks like I'll
I'm trying to install RSRuby on Ubuntu 10.04. I barely even know what error
My Java bean has a childCount property. This property is not mapped to a
This is really a two part question, since I don't fully understand how these

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.