diff --git a/CHANGELOG.md b/CHANGELOG.md index 8546318..be718bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ ## Changelog -Here goes the changelog text. +### 0.1.0 + +Initial release diff --git a/README.md b/README.md index 55f2995..8bfd726 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,11 @@ ## Description -Add your plugin description here. +This plugin allows you to only track visitors from specific countries (or all but specific countries) and discards data from everyone else, reducing the amound of data stored in the database. +You can verify that the plugin works by temporarily enabling [tracking debugging](https://developer.matomo.org/api-reference/tracking-api#debugging-the-tracker) and checking the log. + +### Important Limitations: + +- This plugin needs to check the geolocation while recieving the data. This means that every visit is geolocated twice which might cause (a small amount of) additional server load +- This plugin depends on your geolocation to be properly set up in Matomo. If the geolocation returns incorrect result, this plugin discards incorrect visitors. diff --git a/SystemSettings.php b/SystemSettings.php index 134795b..3abc0b4 100644 --- a/SystemSettings.php +++ b/SystemSettings.php @@ -11,14 +11,7 @@ namespace Piwik\Plugins\ExcludeCountries; use Piwik\Settings\FieldConfig; use Piwik\Settings\Setting; -/** - * Defines Settings for ExcludeCountries. - * - * Usage like this: - * $settings = new SystemSettings(); - * $settings->metric->getValue(); - * $settings->description->getValue(); - */ + class SystemSettings extends \Piwik\Settings\Plugin\SystemSettings { /** @var Setting */ diff --git a/docs/faq.md b/docs/faq.md deleted file mode 100644 index dde17aa..0000000 --- a/docs/faq.md +++ /dev/null @@ -1,5 +0,0 @@ -## FAQ - -__My question?__ - -My answer \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 70135e8..0000000 --- a/docs/index.md +++ /dev/null @@ -1 +0,0 @@ -## Documentation \ No newline at end of file diff --git a/plugin.json b/plugin.json index 76869f8..64bc723 100644 --- a/plugin.json +++ b/plugin.json @@ -1,29 +1,39 @@ { + "name": "ExcludeCountries", + "description": "Exclude or include visitors from selected countries", + "version": "0.1.0", + "theme": false, + "require": { "name": "ExcludeCountries", "description": "TODO", "version": "0.1.0", "theme": false, "require": { - "piwik": ">=3.10.0,<4.0.0-b1" - }, - "authors": [ - { - "name": "Matomo", - "email": "", - "homepage": "" - } - ], - "support": { - "email": "", - "issues": "", - "forum": "", - "irc": "", - "wiki": "", - "source": "", - "docs": "", - "rss": "" + "piwik": ">=3.10.0,<4.0.0-b1" }, "homepage": "", "license": "GPL v3+", "keywords": [] + }, + "authors": [ + { + "name": "Lukas Winkler", + "email": "lukas@matomo.org", + "homepage": "https://lw1.at" + } + ], + "support": { + "email": "lukas@matomo.org", + "issues": "https://github.com/Findus23/plugin-ExcludeCountries/issues", + "forum": "https://forum.matomo.org", + "source": "https://github.com/Findus23/plugin-ExcludeCountries" + }, + "homepage": "https://lw1.at", + "license": "GPL v3+", + "keywords": [ + "geolocation", + "tracking", + "countries", + "filter" + ] } diff --git a/screenshots/settings.png b/screenshots/settings.png new file mode 100644 index 0000000..dc5e013 Binary files /dev/null and b/screenshots/settings.png differ