8 Replies Latest reply on May 29, 2006 5:13 PM by SafariTECH

    tracking with gif/jpg... users movements

    splitzer Level 1

      Hello,
      How do i track images from different domain and get their stats to be displayed? For example, if someone copies my picture and put it on their page like this:
      http://mydomain.com/preview.gif

      How can i track that page where the picture is being displayed? Maybe users ip, page the user came from etc.

      Thanks in advance!
        • 1. tracking with gif/jpg... users movements
          Vbprog40
          Theres couple things you can do.
          You can log visits to the site with IIS and prase the logs out with CF or (What I would do) If theres an image you want others to use on there website make it a "Fake Image"

          http://mydomain.com/preview.cfm (USING CFCONTENT when you display this page it throws http://mydomain.com/preview.gif to the user) To the user its just an ordinary image, with a different extention

          Then you can track anything and everything you want.

          Heres an example of CFContent in use:

          TEST1.CFM PAGE
          <CFHEADER Name="Expires" Value="#Now()#">
          <CFHEADER NAME="pragma" VALUE="no-cache">
          <cfcontent type = "image/jpeg " file = "C:\Inetpub\wwwroot\preview.gif" deleteFile = "no">

          TEST2.CFM PAGE
          The Image: <img src=" http://www.whatever.com/test1.cfm">

          Hope this helps


          • 2. Re: tracking with gif/jpg... users movements
            elDonrico Level 1
            I think what Syed is saying is he wants an image that is copied from his webpage and is placed on another webpage to be able to tell him that it is on their webpage.

            so if i have this right, you want an image to act less like an image and more like a trace back program? unless the image refers to your site to get its value, there is no way you can do this... (besides some fancy code making a .gif not only display an image, but also have spyware prog attached that will report back its location) you can do this sort of thing using Quadrivio on a mac, but, going about writing this code - i have no idea... ive written codes hiding other images or text files inside gifs, but never a program... even though a program would probably execute when the image is displayed. not to mention is not very ethical...

            • 3. Re: tracking with gif/jpg... users movements
              Vbprog40 Level 1
              I realize what he is saying... and the options I gave will work, If you would like to go that route. But just a plan .gif or .jpg will not itself track.
              • 4. Re: tracking with gif/jpg... users movements
                splitzer Level 1
                quote:

                Originally posted by: Vbprog40
                I realize what he is saying... and the options I gave will work, If you would like to go that route. But just a plan .gif or .jpg will not itself track.


                Yes i know, i need coldfusion script that tracks gif/jpg.
                • 5. tracking with gif/jpg... users movements
                  SafariTECH Level 1
                  Unless they actually are pulling the image from your server/site as the href, you cannot track an image that is used elsewhere.

                  For example, if I go to your site, download an image and then save it to my server to use (i.e. href="/myserver/images/thepic.jpg"), there is no way the image can send you information.

                  If they actually link to your site for the image (i.e. href="www.yourserver.com/images/thePic.jpg") then your logs will know where the image is, and you need to parse your logs to figure that out.

                  If you create a script that generates an image via CF ( or any language), that will allow you to more actively track it's whereabouts --- BUT ONLY if they actually link to that image on your site using that exact script reference, which most people will not.


                  Therefore, since most people would download the file and re-upload it to their own server, the chance of actually figuring out who is using it is pretty slim unless you are specifying that they HAVE to use your code ( which again, many people will not).

                  • 6. Re: tracking with gif/jpg... users movements
                    splitzer Level 1
                    safaritech, i was planning to use cfm code generate new image and give the url to user such as:
                    (i.e. href="www.yourserver.com/images/thePic.jpg")

                    So user can track their website through this generated pic.
                    • 7. Re: tracking with gif/jpg... users movements
                      splitzer Level 1
                      I found one site doing the similar thing. The site gives this code:
                      <a href=" http://www.domain.com/" target="_blank">
                      <embed src=" http://www.domain.com/j/5250.jpg" border="0" height="0" width="0">
                      </a>

                      This code goes on to the page that wants to be tracked. Also, not only it trackes also passes the variable to the site.


                      ---
                      I think what they're doing on their site is:
                      They generate this image 5052.jpg. And tell the user to put on to their page, and it passes back certain variable that the site has.


                      • 8. Re: tracking with gif/jpg... users movements
                        SafariTECH Level 1
                        Based on the code you show, that they tell you to use, they are just tracking the image via their server logs.

                        Anytime someone accesses something from your site, it is logged, including all information your browser will provide to it ... such as IP, estimated location, domain, etc etc etc

                        Nothing they are using in that example points to a dynamically tracked image or specialized image tracking service.

                        HOWEVER, you can do it by creating a script that returns an image if you don't have the ability to parse your server logs.
                        The script could be as simple as one that returns an image based on criteria provided, or as complicated as a script that generates it's own image on the fly.

                        However you do it, you would simply have them access the script as <img href=" http://yourserver.com/thescript.cfm?id=3456">

                        In this simple example, a CF page is written that takes teh URL variable of "id" and uses it to pull and return an image to the user.

                        It would be up to you, then, in this same script, to analyze the cgi variables sent back to your server. There is a fair amount of information you can generate using the CGI variables. A search of "CGI" in the CF help will reveal how to use them.