![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Just tracking clicks? F-that, real stats nerds keep track of MOUSE OVERS with flash
If you like to obsess over click-through-rates, then you should also try keeping track of mouse-overs using flash. It is great fun for stats-nerds like myself, and gives you some real insight (when you see 200 mousovers on a button and only 4 clicks, maybe you need to tweak something). Obviously, flash is not always the best option for an "Ad", but there are instances where it can work well, especially when testing traffic quality (mouse-overs at least signify "real" users, even if they aren't clicking).
If anyone wants to play with this idea, here's how you do it: Create two text files called mouseOverCount.txt and clickCount.txt. Each one should contain the following text: "count=0" (Remove the quotes) Create two php files called mouseOverCount.php and clickCount.php. mouseOverCount.php should contain: <?php $count = file_get_contents("mouseOverCount.txt"); $count = explode("=", $count); $count[1] = $count[1]+1; $file = fopen("mouseOverCount.txt", "w+"); fwrite($file, "count=".$count[1]); fclose($file); print "count=".$count[1]; ?> clickCount.php should contain: <?php $count = file_get_contents("clickCount.txt"); $count = explode("=", $count); $count[1] = $count[1]+1; $file = fopen("clickCount.txt", "w+"); fwrite($file, "count=".$count[1]); fclose($file); print "count=".$count[1]; ?> Create your flash advertisement, use Actionscript 2.0 (under Publish Settings). In the actionscript for your button(s), use: on (rollOver) { this.loadVariables("mouseOverCount.php?num="+rando m(99)); } on (release) { this.loadVariables("clickCount.php?num="+random(99 )); getURL("http://www.YourDestinationUrl.com", "_blank"); } Upload everything to the same directory (Swf+html, 2 txt files, 2 php files). Change the Permissions on the TEXT files to 0666 (Read,Write for all Users). Badda bing badda boom, point your browser at clickCount.txt and mouseOverCount.txt to see how many people have moused over and / or clicked on your buttons in flash! -Phil |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jun 2009
Location: Asheville, NC
Posts: 2,277
|
Flash is completely unnecessary here... the same can be accomplished with a mouseover on any html element...
In addition... tracking in a plain text file? really? If you push a lot of traffic you're asking for race conditions and file locking issues... not to mention it's not scalable. Unless you plan on munging a bunch of plain text files together or opening a remote file on a central server for tracking.
__________________
ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Quote:
How would you do it by mousing over a regular link, care to share some javascript with us? That would be EPIC !!! I am also going to look on Google right now to see how to do that, maybe I'll update this thread with it. Thanks for the info. -P |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Jun 2009
Location: Asheville, NC
Posts: 2,277
|
Quote:
__________________
ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
This thread makes my elbow itch.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Quote:
![]() If anyone else is interested, to count Mouse Overs WITHOUT flash, follow the instructions above for creating the php files and text files, but then... On the page that contains your ad / links, add this javascript above your content: <script> function countOver() //Open your counter in an iframe { { frames[0].location = "count.php"; //if you have more than one frame on your page, this will need to be adjusted to target the new iframe. I'm sure you could target it by name also ![]() } } </script> On the link that you want to track mouseovers for, use this code: <a href="javascript:void()"onmouseover="countOver()" onClick="location.href='http://www.destinationURL.com'">Your ad or link</a> Somewhere towards the bottom of your page, create an invisible iframe using code like this: <iframe width="0" height="0" scrolling="no" frameborder="0"></iframe> I'm sure that my code is rather shabby again here, but this gets the basic idea working ;) |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
PS: Thanks for forcing me to look into doing this without Flash, loll ...
|
![]() |
![]() ![]() ![]() ![]() ![]() |