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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:59:03+00:00 2026-05-25T05:59:03+00:00

This was inside the script tag of a website. var _gaq = _gaq ||

  • 0

This was inside the script tag of a website.

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

I’m not very conversant with Javascript or jQuery. I saw this on a website and I’m wondering what it does…

  • 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-25T05:59:03+00:00Added an answer on May 25, 2026 at 5:59 am

    The code in your post is Google’s analytic tracking code. It’s not jQuery, it’s pure JavaScript. Google does a good job explaining what their tracking code does.

    Google Docs Resources

    • What is Google Analytics
    • Google Analytics Code Explained

    Quote from Google’s docs:

    In general, the Google Analytics Tracking Code (GATC) retrieves web
    page data as follows:

    1. A browser requests a web page that contains the tracking code.
    2. A JavaScript Array named _gaq is created and tracking commands are
      pushed onto the array.
    3. A element is created and enabled for asynchronous loading
      (loading in the background).
    4. The ga.js tracking code is fetched, with the appropriate protocol
      automatically detected. Once the code is fetched and loaded, the
      commands on the_gaq array are executed and the array is transformed
      into a tracking object. Subsequent tracking calls are made directly to
      Google Analytics.
    5. Loads the script element to the DOM.
    6. After the tracking code collects data, the GIF request is sent to
      the Analytics database for logging and post-processing.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I call document.write() inside a script tag, can I trust that it will
I have this inside my spring xml file: <object type=Test.Web.Utilities.TestClass, Test.Web singleton=false id=TestClass> <property
It seems that i cannot access $(this) inside jquery ajax success function. please see
if in a literal object i try to reference a function using this inside
Image tag inside email message: <img src=http://www.mydomain.com/image.php?lastest=1> Part of image.php script: case 'image/gif': header('Content-type:
I've got the following code inside a <script> tag on a webpage with nothing
I have this inside my DAO public String CSNSurvey() { StringBuilder mailstr = new
I want to achieve something like this inside a UIView: I have created a
Using asp.net MVC I'd like to do this inside a view: <%= Html.TextBox(textbox1, null,
I would like to know how to write this inside my hittest if statement:

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.