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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:19:19+00:00 2026-05-27T17:19:19+00:00

I have created a webapp using backbone.js and I am trying to integrate google

  • 0

I have created a webapp using backbone.js and I am trying to integrate google analytics in it. The thing is script execution always stops at some point inside ga.js. The code where the execution stops is like this (beautified version) …

var o = e == "_gat" ? K : e == "_gaq" ? Tc : K.p(e);
o[f].apply(o, b[d][ha](1)) 

minified version (line 21)

new ActiveXObject(d),e=c.GetVariable("$version")}catch(o){}e&&(e=e[w](" ")[1][w](","),e=e[0]+"."+e[1]+" r"+e[2])}b=e?e:"-"}Pc=b;

I am logging the events like this:

_gaq.push('_trackEvent', '[header] login', 'click');

I am seeing the code being stopped at the live above in Firebug script tab. If I disable the debugging the google analytics request is not made. The app works fine.

What could be going wrong here? Has anybody else encountered such problem.

UPDATE

It seems like the problem is not related to backbone.js. Even created the simplest of page like this gave the same problem. I checked the Net tab in Firebug – the __utm.gif does load. ga.js also loads successfully. But the pressing the button again gives the same break in execution.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript">
            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'XX-XXXXXX-XX']);
            _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);
            })();
        </script>
        <script type="text/javascript">
            function check() {
                alert("hi");
                _gaq.push('_trackEvent', 'check');
            }
        </script>
    </head>
    <body>
        <input type="button" value="abc" onclick="check();"/>
    </body>
</html>
  • 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-27T17:19:20+00:00Added an answer on May 27, 2026 at 5:19 pm

    You’re calling _trackEvent wrong. Note that the first 2 parameters to _trackEvent are required and the last 2 optional. Also it should be inside brackets.

    Check the signature of the function.

    You’re call should be

    _gaq.push(['_trackEvent', '[header] login', 'click']);
    

    and

    _gaq.push(['_trackEvent', 'check', 'something else']);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a webapp using maven2 archetype in netbeans 6.7. when I do
I have created a webapp using all of the recommended link and meta tags
I have just started using Google Guice with my Tomcat webapp, and have noticed
I have a webapp created using C# and asp.net. I placed a parameter value
I have created a custom dialog for Visual Studio Setup Project using the steps
I have created a PHP-script to update a web server that is live inside
I have created a C# class file by using a XSD-file as an input.
I have created a facebook application using FaceBook ToolKit for .Net, What I am
I have created a webapp which is for iPhone. I need 2 helps. App
I have created a web application using Jersey and Dynamic Web Project of Eclipse.

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.