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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:20:19+00:00 2026-05-13T12:20:19+00:00

I am calling the Google Analytics _trackEvent() function on a web page, and get

  • 0

I am calling the Google Analytics _trackEvent() function on a web page, and get back an error from the obfuscated Google code. In Firebug, it comes back “q is undefined”. In Safari developer console: “TypeError: Result of expression ‘q’ [undefined] is not an object.”

As a test, I have reduced the page to only this call, and still get the error back. Besides the necessary elements and the standard Google tracking code, my page is:

<script>
  pageTracker._trackEvent('Survey', 'Checkout - Survey', 'Rating', 3);
</script>

Results is that error.

What’s going on here?

  • 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-13T12:20:19+00:00Added an answer on May 13, 2026 at 12:20 pm

    This problem seems to occure when the page is not fully loaded yet: http://www.google.com/support/forum/p/Google+Analytics/thread?tid=4596554b1e9a1545&hl=en

    The provided solution is to wait for pageTracker.cb

    function trackEvent(target, action, opt_label, opt_value) {
      if(pageTracker && !pageTracker.cb) {
        setTimeout(function() {
          trackEvent(target, action, opt_label, opt_value);
        }, 200);
        return;
      }
      pageTracker._trackEvent(target, action, opt_label, opt_value);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Errors while calling int getopt function from http://code.google.com/p/darungrim/source/browse/trunk/ExtLib/XGetopt.cpp?r=17 `check.cpp: In function ‘int main()’:` check.cpp:14:55:
when calling Google Analytics' trackEvent function, do I need to URL encode the label
i get Base64 algo. from Google than i convert that string by calling as
I am trying to make a call to get data from Google Analytics. <?php
How to create simple post/get API making simple calling to GAE database using Google
I am calling the following jQuery code on page load to test the concept
I am using Google Analytics for Android to track events, page views on an
I'm having an issue calling a javascript function within a Google Maps InfoWindow. The
When i'm calling this code in the link of a chart in apex javascript:window.open('http://google.pt','mywindow','width=400,height=200',
Following is the Google Analytics code added just before close of /head in html

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.