Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-10-23 02:40:18 +0400
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-10-23 02:40:18 +0400
commit851b2e22b2fc004c4e006abfb84d267d9bfe0b29 (patch)
tree989989fe4794e0162410fe7d1c933bad41f83f09 /misc
parent013711875021fb0b585c86e4b1404132f34cf437 (diff)
- Fixes #708 kudos to Maciej for his work on this one, and Anthon & Matt for the review.
Changes from Maciej's patch: -- the old Actions stats are displayed in the Page titles section, ensure BC when users were specifying page titles, they would appear in the same report. The api Actions.getActions (now deprecated) is a proxy to Actions.getPageTitles) -- applied schema change to log_conversion -- empty action names and empty URLs are now accepted at tracking time. They will be replaced at archiving time by the strings defined in the config file. - API: if a method has a comment @deprecated, it won't be shown in the API listing page (used for the now deprecated Actions.getActions() API call) - Fixes #693 Visits generator now asks for user confirmation before inserting fake data in the DB TODO: - apply small modifs to the JS tracker (setCustomUrl() and action_name defaulting to document.title) - improve/fix unit tests around the expected behavior of Action naming
Diffstat (limited to 'misc')
-rw-r--r--misc/generateVisits.php26
1 files changed, 21 insertions, 5 deletions
diff --git a/misc/generateVisits.php b/misc/generateVisits.php
index a2d2689129..35dec2be44 100644
--- a/misc/generateVisits.php
+++ b/misc/generateVisits.php
@@ -9,12 +9,29 @@ if(file_exists('../bootstrap.php'))
require_once '../bootstrap.php';
}
+if(empty($_GET['choice']) || $_GET['choice'] != 'yes') {
+ echo "<div style='color:red;font-size:large'>WARNING!</div> <br>You are about to generate fake visits which will be recorded in your Piwik database.
+ <br>It will <b>not</b> be possible to easily delete these visits from the piwik logs.
+ <br><br>Are you sure you want to generate fake visits?
+ <br><br>
+ <a href='../index.php'><b>NO</b>, I do not want to generate fake visits</a>
+ <br><br>
+ <a href='?choice=yes'><b>YES</b>, I want to generate fake visits</a>
+ <br><br>
+ Note: you can edit the source code of this file to specify how many visits to generate, how many days, etc.
+ ";
+ return;
+}
+
+
// TODO - generator should generate pages with slash, then test that period archiving doesn't show the unique page view
// TODO - should generate goals with keyword or referer that are not found for this day, to simulate a referer 5 days ago and conversion today
-$minVisitors = 200;
-$maxVisitors = 200;
+$minVisitors = 20;
+$maxVisitors = 100;
$nbActions = 10;
-$daysToCompute = 5;
+$daysToCompute = 1;
+$idSite = 1;
+
//-----------------------------------------------------------------------------
error_reporting(E_ALL|E_NOTICE);
@@ -42,8 +59,7 @@ require_once PIWIK_INCLUDE_PATH . "/index.php";
require_once "FrontController.php";
Piwik::setMaxExecutionTime(0);
-
-$idSite = Piwik_Common::getRequestVar('idSite', 1, 'int');
+$idSite = Piwik_Common::getRequestVar('idSite', $idSite, 'int');
try {
Piwik_FrontController::getInstance()->init();