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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:37:26+00:00 2026-05-24T21:37:26+00:00

I am using Lightbox Slideshow 1.1 (www.justinbarkhuff.com/lab/lightbox_slideshow) on my site which uses javascript to

  • 0

I am using Lightbox Slideshow 1.1 (www.justinbarkhuff.com/lab/lightbox_slideshow) on my site which uses javascript to display photos in a modal window and it has a Google Analytics option built-in to its javascript file, but it uses the old urchintracker code. I’m very unfamiliar with modifying javascript. I was wondering if anyone could help me transform this code from the old urchintracker to the new Asynchronous code. More info on migrating to that new code can be found here – http://code.google.com/apis/analytics/docs/tracking/asyncMigrationExamples.html

The code in the lightbox.js file in question is:

if(this.options.googleAnalytics){
    urchinTracker(this.imageArray[this.activeImage].link);
}

With “(this.imageArray[this.activeImage].link)” being the variable which passes the path and filename of the image currently being viewed (i.e. “p/image1.jpg“) to Google Analytics. This works great and my Google Analytics is receiving data fine, but I need to convert to the latest Asynchronous code.

I want to convert to an Event tracker in the new code, so instead of the script just sending urchinTracker(‘p/image1.jpg’); I would need it to be instead:

_gaq.push(['_trackEvent', 'Photos', 'View', 'currentimage.jpg']);

(Where “currentimage.jpg” is the value passed by “(this.imageArray[this.activeImage].link);” in the lightbox.js file.

(“_gaq.push” is the new “urchintracker“)

To view the lightbox.js file, go to: http://www.justinbarkhuff.com/lab/lightbox_slideshow/lightbox.js and search for “urchintracker”.

If anyone who knows Javascript could help me transform this above code so I can use the latest code for Google Analytics, I’d really appreciate it. Or if you could point me in the right direction. Thanks in advance.

I wonder..
could it be as simple as this?

if(this.options.googleAnalytics){
    _gaq.push(['_trackEvent', 'Photos', 'View', this.imageArray[this.activeImage].link]);
}

What about the ‘ symbols around this.imageArray[this.activeImage].link? Will the script automatically pass them on without me adding them to the code?

Thanks in advance for any and all help!

  • 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-24T21:37:27+00:00Added an answer on May 24, 2026 at 9:37 pm

    Yes. Your code is perfectly well adopted. Try it out; assuming it was working before, it should work now.

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

Sidebar

Related Questions

I am using Lightbox Gone Wild to display a modal dialog with a form
I'm using Lightbox to display photos. So If I have two categories of photos,
I'm using this lightbox gallery http://www.no-margin-for-errors.com/projects/prettyGallery/ since it gaves me the chance of inputting
Hi I am Using the jQuery Lightbox For Native Galleries for Wordpress which uses
I am using lightbox slideshow and it is working fine, there is Next-Prev button
hey i'm using a jquery plugin Fancybox , which is a Lightbox type plugin.
I'm having a problem. I'm using jquery.lightbox-0.5 to display images and everything works fine
I am trying to create a pseudo lightbox using very little Javascript. I am
I'm using sIFR in a page that's being popped up in a nyroModal lightbox,
I am getting a weird error. I can see images in slideshow, lightbox, etc.

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.