Greasemonkey User Script: “Random Traffic”
Ein Page Impression Generator für das FF Add-on Greasemonkey
Um verschiedene Traffic-Dienste (z. B Alexa m. H. d. Alexa Toolbar oder Quirk Search Status, Google usw.) und Analysetools zu testen, erzeugt dieses Script zeitlich zufällige Seitenaufrufe aus einem Array in zufälliger Reihenfolge.
Es eignet sich nicht, um Referrer auszuwerten, da es diese funktionsbedingt nicht erzeugt ;-)
Die Benutzung erfolgt auf eigene Gefahr. Lesen Sie die Nutzungsbedingungen der jeweiligen Anbieter!
// ==UserScript==
// @name Random Traffic
// @namespace http://blog.andreas.georg-toncic.de
// @copyright Andreas Georg-Toncic
// @description Random generating page impressions to evaluate traffic/statstic tools in terms of blunders in recording or analysing data
// @include *
// @exclude about:*
// @exclude chrome:*
// ==/UserScript==
function getRandom(min, max) {
if(min>max) { return(-1); }
if(min==max) { return(min); }
return(min+parseInt( Math.random()*(max-min+1)));
}
function autobrowse(page, wait) {
setTimeout(function() { document.location=page; } , wait);
return;
}
var site = new Array(); /* #### change and/or add further homepages and customise the value for getRandom(0, XY) - see below #### */
site[0] = "http://your.site.com/";
site[1] = "http://your.site.com/";
site[2] = "http://your.site.com/";
site[3] = "http://your.site.com/";
site[4] = "http://your.site.com/";
site[5] = "http://your.site.com/";
site[6] = "http://your.site.com/";
site[7] = "http://your.site.com/";
site[8] = "http://your.site.com/";
site[9] = "http://your.site.com/";
site[10] = "http://your.site.com/";
var time=getRandom(5, 25)*3017; /* #### Interval between 15 sec and 75 sec #### */
if(time<15500){ time=time+11480; }
autobrowse(site[Math.round(getRandom(0, 10))], time); /* #### Change value of getRandom(0, xy) according to the number of your last site[xy] #### */
// ### EOF ###