Results 1 to 9 of 9
  1. #1
    Newbie
    Join Date
    January 18th, 2005
    Posts
    43
    Single pixel gifs for tracking
    I have a page on a merchants site where I want to put a link to single pixel gif so that I can track when a sale is made. My site - which will contain the gif - is on a site where I use php/mysql, with mysql storing the 'hit'.

    Anyone got a simple example of what the link might look like and the code on the gif page? I gotta get my tracking sorted pronto!

    Jon

  2. #2
    Newbie
    Join Date
    December 12th, 2006
    Posts
    31
    I think you mean an img tag with link to your tracking code, a gif can't do any tracking.

    You would have something like this in the page you want to track

    <img src="http://yourdomain.com/tracking.php" />

    Where tracking.php is your code to store the hit information

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Posts
    43
    That is exactly right. I am having trouble working out what to put on the page the link refers to.

    e.g. <img src="http://yourdomain.com/tracking.php" />

    On page tracking.php, I can put the code in there to update my database. But if that was all there was, it would be fine. But as I understand it, the link is supposed to be to an image (single pixel gif). So what am I supposed to do regarding this?

  4. #4
    Moderator MichaelColey's Avatar
    Join Date
    January 18th, 2005
    Location
    Mansfield, TX
    Posts
    16,232
    You could always just have it redirect to a real 1x1 pixel.
    Michael Coley
    Amazing-Bargains.com
     Affiliate Tips | Merchant Best Practices | Affiliate Friendly? | Couponing | CPA Networks? | ABW Tips | Activating Affiliates
    "Education is the most powerful weapon which you can use to change the world." Nelson Mandela

  5. #5
    Newbie
    Join Date
    January 18th, 2005
    Posts
    43
    I need the php page so that I can run some code to update my database. A real 1x1 pixel on its own won't do that for me.

  6. #6
    Moderator MichaelColey's Avatar
    Join Date
    January 18th, 2005
    Location
    Mansfield, TX
    Posts
    16,232
    Have the PHP page do the database update, then redirect to a real 1x1 pixel.

    You could also do the database update and then serve up the headers and data for a 1x1 pixel, but a redirect is probably simpler.
    Michael Coley
    Amazing-Bargains.com
     Affiliate Tips | Merchant Best Practices | Affiliate Friendly? | Couponing | CPA Networks? | ABW Tips | Activating Affiliates
    "Education is the most powerful weapon which you can use to change the world." Nelson Mandela

  7. #7
    Newbie
    Join Date
    January 18th, 2005
    Posts
    43
    I saw this line of code from an asp version: Response.write("http://mySite.coim/ipix.gif")

    So what would I use to serve up the headers?

  8. #8
    Newbie
    Join Date
    December 12th, 2006
    Posts
    31
    Not sure why you are saying it needs to be an image? Is it because the webpage will show an image not found display error? A simple styling will fix this:

    <img src="http://yourdomain.com/tracking.php" style="display:none;" />

    I use this type of tracking all the time

  9. #9
    Affiliate Manager MINDsprinter's Avatar
    Join Date
    August 18th, 2006
    Location
    Washington, DC
    Posts
    1,436
    My pixels look something like this:

    Code:
    <img
    src="http://xxxxxxx.com/pixel?id=uniqueID" width="1" height="1"
    />
    A unique identifier which updates a database. Done.
    Jason Rosenbaum
    Affiliate Manager
    MINDsprinting

  10. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Tracking Pixel
    By Convergence in forum Midnight Cafe'
    Replies: 2
    Last Post: July 27th, 2011, 09:15 PM
  2. Pixel Tracking using PHP
    By kash1987 in forum Programming / Datafeeds / Tools
    Replies: 0
    Last Post: March 26th, 2010, 07:06 PM
  3. Pixel Tracking
    By dnathan in forum Programming / Datafeeds / Tools
    Replies: 0
    Last Post: March 10th, 2008, 11:42 AM
  4. Single pixel gifs for tracking
    By Jon12345 in forum Midnight Cafe'
    Replies: 2
    Last Post: January 6th, 2007, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •