From 34c4a857126cd936ff1e9b1a4fb590306be1c879 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Tue, 24 Apr 2018 13:26:39 +1200 Subject: GDPR + Add a couple of new platform features especially around validating settings (#12558) * add a couple of new platform features especially around validating settings * more validators and other tweaks * few tweaks * allow plugins to add header script in JS tests * some work on gdpr * remove email feature * menu update * add date tooltip * make sure privacy has its own icon * added some text * add opt out info * better titles * add some information about webserver logs * add log import notice * give angular some time to render * show border around iframe * make sure to place a notification in modal dialog if needed * when opening a modal, make sure the top part is visible * disable newsletter sign up by default * command line tool to anonymize and remove previously tracked raw data * implement some basic consent features into piwik.js * minor tweak * schedule entries to anonymize data in past * let users anonymize historical data * better overview * better naming * explain consent tracking * add legitimate interest * new menu structure for privacy * use a proper db table for scheduled anonymizations * add some tracker tests * some tests and fixes * couple of fixes and tests * starting to add some UI tests * more tweaks * add missing file * fix jslint * have the field full width * more tweaks * create directory if needed * various fixes * fix some tests * make sure keys will be always returned in same order * more fixes * fix some tests * apply feedback from review * fix some tests * this might fix mysqli tests * fix some tests * trying to fix mysqli tests * fix system test * fix comment * remove some duplicated code * update method name * trigger event when logs need to be deleted * add possibility to anonymize userId and orderId * trigger event in tracking code page * expire consent in hours * post another event * update wording for privacy GDPR * fix various ui tests * fix some tests * trying to fix ui tests * trigger another test run * fix system test * fix some ui tests * show a table of contents on tracking code page, fix title, add mobile apps and API * fix ui test * 3.5.0-b2 update * Re-generate piwik.js * fix job status and selector style * make sure to include only sites with admin access * some tweaks * fix some ui tests * fix some ui tests * fix test --- plugins/CoreAdminHome/Controller.php | 8 +++++ plugins/CoreAdminHome/lang/en.json | 3 ++ .../templates/trackingCodeGenerator.twig | 42 ++++++++++++++++++---- 3 files changed, 47 insertions(+), 6 deletions(-) (limited to 'plugins/CoreAdminHome') diff --git a/plugins/CoreAdminHome/Controller.php b/plugins/CoreAdminHome/Controller.php index 8ca2d69077..3fead3fa3a 100644 --- a/plugins/CoreAdminHome/Controller.php +++ b/plugins/CoreAdminHome/Controller.php @@ -173,6 +173,14 @@ class Controller extends ControllerAdmin $defaultIdSite = reset($viewableIdSites); $view->idSite = Common::getRequestVar('idSite', $defaultIdSite, 'int'); + if ($view->idSite) { + try { + $view->siteName = Site::getNameFor($view->idSite); + } catch (Exception $e) { + // ignore if site no longer exists + } + } + $view->defaultReportSiteName = Site::getNameFor($view->idSite); $view->defaultSiteRevenue = Site::getCurrencySymbolFor($view->idSite); $view->maxCustomVariables = CustomVariables::getNumUsableCustomVariables(); diff --git a/plugins/CoreAdminHome/lang/en.json b/plugins/CoreAdminHome/lang/en.json index 6f98029d49..0c8e4c8fd8 100644 --- a/plugins/CoreAdminHome/lang/en.json +++ b/plugins/CoreAdminHome/lang/en.json @@ -22,6 +22,8 @@ "InvalidPluginsWarning": "The following plugins are not compatible with %1$s and could not be loaded: %2$s.", "InvalidPluginsYouCanUninstall": "You can update or uninstall these plugins on the %1$sManage Plugins%2$s page.", "JavaScriptTracking": "JavaScript Tracking", + "HttpTrackingApi": "HTTP Tracking API", + "HttpTrackingApiDescription": "The %1$sHTTP Tracking API%2$s allows you to track anything. This may be useful if you are using a programming language for which no SDK exists yet. It may also be useful when you want to track devices or application in a special way.", "JSTracking_CampaignKwdParam": "Campaign Keyword parameter", "JSTracking_CampaignNameParam": "Campaign Name parameter", "JSTracking_CodeNoteBeforeClosingHead": "Make sure this code is on every page of your website. We recommend to paste it immediately before the closing %1$s tag.", @@ -86,6 +88,7 @@ "SystemPluginSettings": "System Plugin Settings", "TrackAGoal": "Track a goal", "TrackingCode": "Tracking Code", + "TrackingCodeIntro": "Matomo offers you various ways to embed the tracking code for your website, mobile app, and even for any device or application.", "TrustedHostConfirm": "Are you sure you want to change the trusted Matomo hostname?", "TrustedHostSettings": "Trusted Matomo Hostname", "UpdateSettings": "Update settings", diff --git a/plugins/CoreAdminHome/templates/trackingCodeGenerator.twig b/plugins/CoreAdminHome/templates/trackingCodeGenerator.twig index 1ea4a0f744..dab8773815 100644 --- a/plugins/CoreAdminHome/templates/trackingCodeGenerator.twig +++ b/plugins/CoreAdminHome/templates/trackingCodeGenerator.twig @@ -5,17 +5,34 @@ {% endblock %} -{% set title %}{{ 'CoreAdminHome_JavaScriptTracking'|translate }}{% endset %} +{% set title %}{{ 'CoreAdminHome_TrackingCode'|translate }}{% endset %} {% block content %} +
+
+

{{ 'CoreAdminHome_TrackingCode'|translate }}

+

{{ 'CoreAdminHome_TrackingCodeIntro'|translate }}

+
+ +
+
+ anchor="javaScriptTracking" + content-title="{{ 'CoreAdminHome_JavaScriptTracking'|translate|e('html_attr') }}">
@@ -238,7 +255,8 @@
-
+
@@ -314,9 +332,21 @@
-
+

{{ 'CoreAdminHome_ImportingServerLogsDesc'|translate('','')|raw }}

+ +
+

{{ 'SitesManager_MobileAppsAndSDKsDescription'|translate('','')|raw }}

+
+ +
+

{{ 'CoreAdminHome_HttpTrackingApiDescription'|translate('','')|raw }}

+
+ +{{ postEvent('Template.endTrackingCodePage') }} + {% endblock %} -- cgit v1.2.3