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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:29:38+00:00 2026-05-26T11:29:38+00:00

My application is a single web page (myPage.html) displaying items on a Google Map.

  • 0

My “application” is a single web page (myPage.html) displaying items on a Google Map. So it is not a scenario where the user navigates among several pages.

Therefor I am using events to track the interactions. However, I find it strange to believe what I see in the statistics.

I have checked the events for syntax and it seems to be OK.

 _gaq.push(['_trackEvent', 'MyApp', 'ChangeTav', newTab]);
 _gaq.push(['_trackEvent', 'MyApp', 'Load', 'itemType', loadTime]);
 ....

What I wonder about, I do add Arrays to to _gaq object, but when are these actually send? What happens if the user closes the browser? And is there a way for me to “force” sending these values?

The other way around, user stays on the page for some time, values get added to _gaq, but how I do make sure they not getting lost?

— Update —

With the push I simply add an Array to an Array, or is this wrong? So in this particular moment nothing happens, I did not see any callbacks or overridden methods. Please correct if I am missing something.

— Update 2 —

http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html

It seems to be different whether I use sync or async. For async (I am using) …

To push an API call onto the queue, you must convert it from the traditional JavaScript syntax into a command array. Command arrays are simply JavaScript arrays that conform to a certain format. The first element in a command array is the name of the tracker object method you want to call. It must be a string. The rest of the elements are the arguments you want to pass to the tracker object method. These can be any JavaScript value.

When I do init with var _gaq = _gaq || []; it becomes an array. However, I do never see values being removed from the queue (_gaq), so I’d assume they are never send.

— OK, here we go —

http://code.google.com/apis/analytics/docs/gaJS/gaJSApi_gaq.html#_gaq.push

This function is named push so that an array can be used in the place of _gaq before Analytics has completely loaded. While Analytics is loading, commands will be pushed/queued onto the array. When Analytics finishes loading, it replaces the array with the _gaq object and executes all the queued commands. Subsequent calls to _gaq.push resolve to this function, which executes commands as they are pushed.

  • 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-26T11:29:39+00:00Added an answer on May 26, 2026 at 11:29 am

    I believe, it’s send as soon as you call it. Provided that the _gaq has been initialized. Depends on where you put the GA init code.

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

Sidebar

Related Questions

I'm working on my first very complex JQuery based application. A single web page
Looking around, I can't name a single web application (not web service) that uses
How should a complex single-page JS web application be structured on the client-side? Specifically
I am trying to develop the single page in asp.net web mobile application as
Is it possible to implement Single Page Web Application that would have sensitive data,
I am trying to use hijacking to do a single-page web application using mvc.
I am working on a web application that has a single master page and
Have you experimented with single page web application, i.e. where the browser only 'GETs'
I am building a single-page web application and I've been looking for a library
I'm in the technologies selection phase of a small, single-page web application that will

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.