i have an image carousel written in jquery. now i need to be able to track which of the individual images are shown and which are clicked. i got my click-count URL and my view count tag, but i’m unsure of how to do this.
-
How/where do i add the view count tag for the individual images? in the css as a background image? in the php/html code after the image?
-
how can i know which images have been shown to the user, considering that all the images a re loaded when the page loads, and the overflow is hidden? i was thinking of something like a callback fired by the move of the carousel, so it would reload the images that are currently visible?
Any help greatly appreciated!
Why do you need to add more to the html? Your server can already handle this:
In the simplest case, just server your images as
/getandtrack.php?image=/images/etc.pnginstead of/images/etc.png. Thengetandtrack.phpdoes the tracking, then redirects to the image that was requested.