Announcement

Collapse
No announcement yet.

A way to track clicks of a single link?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • A way to track clicks of a single link?

    I want to track which of my users have clicked on my ads. Is there any way to do this? Any help at all or pointing in the right direction would be greatly appreciated!

    I don't care if tracking is by username, userid, or IP.

    MGM out

  • #2
    Make the link to somewhere on your website, ie:

    http://www.yourdomain.com/script.php?u=username

    Or userid, IP address... whatever.

    In that script.php, do what you want to record the click. After you record it, use a header redirection to the actual ad (put the ad link in the query string, and make sure you urlencode it )
    http://www.webtrickscentral.com/images/wtcsig.jpg

    Comment


    • #3
      Thing is, the ads are placed right there, so how would it work if they have to click on a link to script.php to view the ads?

      MGM out

      Comment


      • #4
        You could maybe get Javascript to do some dual action... Make a PHP script that works with the username in the query string, then when the user clicks on your ads get Javascript to load an image with the SRC to your script (much liek vB's cron image calls a script), then let the link act as normal.

        Comment


        • #5
          lol, im not all that advanced with javascipt or php

          any other ideas?

          MGM out

          Comment


          • #6
            What kind of ads are they? Personally placed ads? If you're allowed to alter the code (some places like CJ don't let you alter their code), you could just link to a script with the username and the URL to forward to.

            ads.php?username=someuser&url=http://www.theurl.com

            Comment


            • #7
              yea, you would just have the link as a variable, then once you've ran the MySQL or PHP to update your stats use:

              header("Location: {$_GET['link']}");

              That is how I would do it

              Comment


              • #8
                They're Google AdSense Ads... would I be able to get it to work that way? I saw the code, and it links through a javascript, when I tried pulling it out I just got errors or nothing at all

                MGM out

                Comment


                • #9
                  how are they included?

                  If it is done using require() or something, then you could alter the links

                  If not, then are the links named?

                  Comment


                  • #10
                    No, they link to a javascript and I guess it uses frames to show the ads on the page

                    MGM out

                    Comment


                    • #11
                      They're framed so I don't know how you could go about it

                      Does google not provide stats?

                      Comment


                      • #12
                        They do, but they don't provide who clicked on the ads. I want to be able to reward my members for clicking on our sponsors and/or buying stuff from them. But I have no idea how I'd be able to do this.

                        MGM out

                        Comment


                        • #13
                          AFAIK you can not 'reward' or tell your users to click on the Google Ads....
                          Running vB since 4-14-2002

                          Comment


                          • #14
                            Originally posted by IDN
                            AFAIK you can not 'reward' or tell your users to click on the Google Ads....
                            Yea, I just read the license agreement and saw that. Forget about it guys lol

                            MGM out

                            Comment

                            Loading...
                            Working...
                            X