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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:14:27+00:00 2026-06-08T06:14:27+00:00

I’m trying to get Google Analytics working on my blog , but the events

  • 0

I’m trying to get Google Analytics working on my blog, but the events are failing to show up in my account.

Part of the issue is that I’m using the new async code, but most of the documentation relates to the older synchronous version. I’ve read a bunch of SO and blog posts but can’t quite see what I’m doing wrong.

One mentions that you have to “activate” event tracking in your site’s profile, but I can’t find where I might do that.

I originally put my Google Analytics code in an external file called ga.events.js, which is still linked from my site. I attached the events from a jQuery loaded event:

$(function () {
  $('.rss').click(function() {
    trackEvent("engagement", "rss subscribe", "rss subscription link clicks");
  });

  function trackEvent(category, action, label) {
    _gaq.push(['_trackEvent', category, action, label]);
  }
});

But I found a post that said you can’t link in an external file for Google Analytics, so I also tried the old fashioned onclick approach:

<a href="http://forms.aweber.com/form/08/728505808.htm" onclick="_gaq.push(['_trackEvent', 'Engagement', 'Click', 'Mailing list subscribe']);" target="_blank">email list</a>

I put the _target="blank" attribute in case the request wasn’t completing before the user navigated away from the page.

Executing the code in the Chrome console on my site returns a 0, when I was expecting a boolean value:

_gaq.push(['_trackEvent', 'Engagement', 'click', 'RSS subscription link'])

I’ve waited 24 hours after each of these tests to see if the event tracking wasn’t real time.

What else should I try? Any obvious mistakes?

  • 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-06-08T06:14:28+00:00Added an answer on June 8, 2026 at 6:14 am

    Figured it out. I had onclick instead of onClick with a capital C. Wait, JavaScript is a case sensitive language? Who knew?

    I also had the syntax of the GA call incorrect.

    Here’s what my working code looks like:

    <a href="http://forms.aweber.com/form/08/728505808.htm" onClick="_gaq.push(['_trackEvent', 'Engagement', 'Post footer click', 'Mailing list subscription',, false]);" target="_blank">email list</a>
    

    And here’s a version that works using jQuery to attach the click handlers:

    $(function () {
      $('.rss').click(function() {
        trackEvent('Engagement', 'Sidebar link click', 'RSS feed subscription');
      });
    
      function trackEvent(category, action, label) {
        _gaq.push(['_trackEvent', category, action, label,, false]);
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.