GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Just tracking clicks? F-that, real stats nerds keep track of MOUSE OVERS with flash (https://gfy.com/showthread.php?t=971584)

jawanda 06-03-2010 08:57 AM

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

seeandsee 06-03-2010 09:00 AM

That is interesting but why did they point mouse to ad if they don't want to click?

jawanda 06-03-2010 09:01 AM

Quote:

Originally Posted by seeandsee (Post 17205577)
That is interesting but why did they point mouse to ad if they don't want to click?

EXACTLY the question you will be asking yourself a lot when you start tracking mouse overs ... lol

BestXXXPorn 06-03-2010 09:04 AM

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.

jawanda 06-03-2010 09:07 AM

Quote:

Originally Posted by BestXXXPorn (Post 17205592)
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...

I'm not a real programmer, obviously, just showing a simple way that this can be accomplished that I have used.

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

BestXXXPorn 06-03-2010 09:09 AM

Quote:

Originally Posted by jawanda (Post 17205603)
I'm not a real programmer, obviously, just showing a simple way that this can be accomplished that I have used.

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

in any html element you could add an ajax request for onmouseover and/or onclick... That will fire your tracking script in the same way the flash version does :P

GrouchyAdmin 06-03-2010 09:11 AM

This thread makes my elbow itch.

jawanda 06-03-2010 09:30 AM

Quote:

Originally Posted by BestXXXPorn (Post 17205608)
in any html element you could add an ajax request for onmouseover and/or onclick... That will fire your tracking script in the same way the flash version does :P

Ok, Found a simple way to do it, still utilizing our hurting text-file-based-tracking :)

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 ;)

jawanda 06-03-2010 09:32 AM

PS: Thanks for forcing me to look into doing this without Flash, loll ...


All times are GMT -7. The time now is 07:19 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc