Ad rotator with click tracking

Posted on 2006-04-20
Last Modified: 2012-05-05
I am looking for some sample code that will rotate ads on a web page.  The code I have is a javascript and it rotates the ads find.  I want to be able to track the clicks each time an ad is clicked on.    I am using but dont want tp use the ad rotator control becuase i want the ads to rotate every few seconds and no just when the page is refreshed.  Can somebody give me input on how i can do this?

Question by:Mike_Stevens
    LVL 11

    Expert Comment

    can't your monitor onclick event and see what is the ad that is clicked at the moment?

    Author Comment

    I dont know......i guess that is what I am asking
    LVL 11

    Accepted Solution

    I think you can use such approach.
    Write a javascript function YourFunction which to be called on onClick event, and add it in the tag where the ads are handled like this onClick="YourFunction()"
    In the function check which ad is currently displayed - I suppose you can check for some id of the ad, you may see it from the JS function that you've said you already use.

    Author Comment

    I will give it a shot.  Sounds like a good approach.  Now i just have to see if i can make it work.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now