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

  • Home
  • SEARCH
  • 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 6368125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:38:10+00:00 2026-05-25T00:38:10+00:00

The site in question is http://getstefan.com Its a single page portfolio site and I

  • 0

The site in question is http://getstefan.com

Its a single page portfolio site and I have tried using jQuery to add Google Analytics click tracking to every anchor tag on the site hoping to track where people are clicking. There is a script that adds a unique ID to each anchor on the page, so I set a timeout to make sure and place the Google Analytics click tracking after the id has been assigned. Like so:

jQuery(window).load(function(){
        setTimeout(loadOnClick,8000)
    });

    function loadOnClick() {
        jQuery('a').each(function(){
            jQuery(this).attr("onclick", "_gaq.push(['_trackEvent', 'anchor', 'click', '" + jQuery(this).attr('id') + "']);" );
        });
    }

Which results in building a link like so:

<a href="http://getstefan.com/wp-content/themes/inc v2/downloads/CV-StefanHinck-FR.pdf" id="cv" onclick="_gaq.push(['_trackEvent', 'anchor', 'click', 'cv']);"></a>

Everything looks good.
Problem is that when I look at my analytics, the only clicks registered are labeled “untitled”

Anyone know what im doing wrong 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-25T00:38:11+00:00Added an answer on May 25, 2026 at 12:38 am

    First
    Your anchors don’t have an ID assigned, so the code is doing exactly what it should be reporting ‘undefined’ as the value for something that doesn’t exist.
    For example

    <a class="entry-link" href="http://getstefan.com/portfolio/interior-design-logo/"></a>
    

    Second, don’t use the timer.

    jQuery(window).load(function(){
            setTimeout(loadOnClick,8000)
        });
    

    should be replaced by

    jQuery(document).ready(function(){
            loadOnClick();
        });
    

    so you don’t have to wait 8 seconds and can just assign everything when the DOM is ready.

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

Sidebar

Related Questions

Hey everyone, here is the site in question: http://www.myvintagesecret.com/ I have a bunch of
The page in question is at the following address: http://richiesportfolio.com/temp-site-tester/index.html As you can see
Link to site in question: http://www.christopherwarrington.com/testing_ground I have a start screen that is set
site in question: http://ecogroovellc.com When looking at the 2nd child menu drop-down (Portfolio>Music), it
Here's the site in question: http://cbcsettlementfunding.com/dev/ Almost finished up with development, just have a
Alright, here's the site in question: http://abramobile.com If you scroll down the page past
I have a question. I visited a site : http://currenthiphop.com/ . And when I
Site in question: http://www.blues-n-brews.com/paypal_receipt.php?tx=17G30980M69737722 I have this: <div id=print_special style=width: 1050px; zoom: 0.8; margin:
Site in question: http://www.sedulity.tk/ Site using Chrome 19 dev: Site using IE9: as you
Spec Apache2,Tomcat6,jdk1.6,struts2,Ajax,jQuery My question : A web site working perfectly on Http mode(apache2 http

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.