diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8fe02d3 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# top-most EditorConfig file +root = true + +# All files +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +# 4 space indentation for PHP +[*.php, *.inc] +indent_style = space +indent_size = 4 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 723ef36..a09c56d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -.idea \ No newline at end of file +/.idea diff --git a/CHANGELOG.md b/CHANGELOG.md index 56682af..231ce9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# v1.4.0 +## 01/04/2017 + +1. [](#new) + * Preload the Google Analytics script asynchronously + * Choose the code position in the HTML document (head or body) + * Custom Cookie Configuration. Name, domain and expiration time are configurable. + * Force SSL - Send all data using SSL, even from insecure (HTTP) pages +1. [](#improved) + * Improve plugin configuration with tab views. + * Better use and configuration of the global object name. Please use `objectName` instead of `renameGa`. + # v1.3.0 ## 12/21/2016 diff --git a/LICENSE b/LICENSE index 484793a..0ac012c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Grav +Copyright (c) 2016 John Linhart (admin@escope.cz), Christian Worreschk (cw@marsec.de) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 1a90b5d..c864dee 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,90 @@ -# Google Analytics Grav Plugin +# Grav Google Analytics Plugin -This is [Grav CMS](http://getgrav.org) plugin that helps you implement [Google Analytics](https://www.google.com/analytics) tracking code into your website. That way your GA tracking will be theme-independent. +The **Google Analytics** Plugin for [Grav CMS](http://github.com/getgrav/grav) allows you to integrate and configure [Google Analytics](https://www.google.com/analytics) without the need to touch any code within your Grav site. -# Installation +### Features +* Preload the Google Analytics script asynchronously +* IP Anonymization +* Choose the Google Analytics code position in the HTML document (head or body). +* Force SSL (HTTPS). Send all data using SSL, even from insecure (HTTP) pages. +* Renaming of the Global (ga) Object +* Debug Mode with Trace Debugging +* Custom Cookie Configuration. Name, domain and expiration time are configurable. +* Blocking IP Addresses +* Multi-Language Support for the [Grav Administration Panel](https://github.com/getgrav/grav-plugin-admin) -Installing the Google Analytics plugin can be done in one of two ways. +## Installation -## GPM Installation (Preferred) +Installing the Google Analytics plugin can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file. -The simplest way to install this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm) through your system's Terminal (also called the command line). From the root of your Grav install type: +### GPM Installation (Preferred) + +The simplest way to install this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm) through your system's terminal (also called the command line). From the root of your Grav install type: bin/gpm install ganalytics This will install the Google Analytics plugin into your `/user/plugins` directory within Grav. Its files can be found under `/your/site/grav/user/plugins/ganalytics`. -## Manual Installation +### Manual Installation -To install this plugin, just [download](https://github.com/escopecz/grav-ganalytics/archive/master.zip) the zip version of this repository and unzip it under `/your/site/grav/user/plugins`. Then, rename the folder to `ganalytics`. +To install this plugin, just download the zip version of this repository and unzip it under `/your/site/grav/user/plugins`. Then, rename the folder to `ganalytics`. You can find these files on [GitHub](https://github.com/escopecz/grav-ganalytics) or via [GetGrav.org](http://getgrav.org/downloads/plugins). You should now have all the plugin files under /your/site/grav/user/plugins/ganalytics + +> NOTE: This plugin is a modular component for Grav which requires [Grav](http://github.com/getgrav/grav) to operate. -# Config Defaults +## Configuration -``` -enabled: true # Global enable/disable the entire plugin -trackingId: '' # GA Tracking ID `REQUIRED` -renameGa: '' # Other name for the global (ga) variable -anonymizeIp: false # Enable/Disable IP Anonymization -blockedIps: # Array of blocked IPs -debugStatus: false # Enable/disable Debugging -debugTrace: false # Enable/Disable Trace Debugging -``` +Before configuring this plugin, you should copy the `user/plugins/ganalytics/ganalytics.yaml` to `user/config/plugins/ganalytics.yaml` and only edit that copy. + +Here is the default configuration and an explanation of available options: -If you need to change any value, then the best process is to copy the [ganalytics.yaml](ganalytics.yaml) file into your `users/config/plugins/` folder (create it if it doesn't exist), and then modify there. This will override the default settings. +```yaml +enabled: true +trackingId: "" -# Usage +position: "head" +objectName: "ga" +forceSsl: false +async: false +anonymizeIp: false +blockedIps: [] + +cookieConfig: false +cookieName: "_ga" +cookieDomain: "" +cookieExpires: 63072000 + +debugStatus: false +debugTrace: false +``` -1. In your Google Analytics account, open the analytics of the Grav website (or create new if doesn't exist yet). -2. Go to *Admin* / *Tracking Info* / *Tracking Code* -3. Copy the *Tracking ID* and insert it to the configuration of this plugin. +* `enabled` Toggles if the Google Analytics plugin is turned on or off. +* `trackingId` The Google Analytics Tracking ID. This value is **required**. + +* `position` Code Position in the HTML document (`head` or `body`). Default is `head`. +* `async` Toggles if the Google Analytics script is preloaded asynchronously. +* `forceSsl` Toggles if Google Analytics should send all data using HTTPS. +* `objectName` The name for the global (ga) object. Default is `ga`. +* `anonymizeIp` Toggles if Google Analytics will anonymize the IP address for all hits. +* `blockedIps` Here you can blacklist IP addresses. For those the Google Analytics script will not be embedded. + +* `cookieConfig`: Toggles if the a custom cookie configuration should be used. +* `cookieName` The cookie name. Default ist `_ga` +* `cookieDomain` The cookie domain. +* `cookieExpires` The cookie expiration time in seconds. Google default is 2 years (`63072000` seconds) + +* `debugStatus` Toggles if the debug version of Google Analytics is enabled or disabled. +* `debugTrace` Toggles if the debugger will output more verbose information to the console. `debugStatus` must be enabled. + +## Usage + +1. Sign in to your [Google Analytics account](https://www.google.com/analytics/web/#home). +2. Select the **Admin** tab. +3. Select an account from the dropdown in the _ACCOUNT_ column. +4. Select a property from the dropdown in the _PROPERTY_ column. +5. Under _PROPERTY_, click **Tracking Info > Tracking Code**. +6. Copy the **Tracking ID** (a string like _UA-000000-01_) +7. Add it to the configuration of this plugin. diff --git a/blueprints.yaml b/blueprints.yaml index 2010ed2..717dc74 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,6 +1,6 @@ name: Google Analytics -version: 1.3.0 -description: "Google Analytics plugin lets you easyly embed the GA tracking to the Grav website." +version: 1.4.0 +description: "Easily integrate and configure Google Analytics without the need to touch any code within your Grav site." icon: google author: name: John Linhart @@ -9,94 +9,177 @@ author: homepage: https://github.com/escopecz/grav-ganalytics keywords: google, plugin, tracking, analytics, grav bugs: https://github.com/escopecz/grav-ganalytics/issues +docs: https://github.com/escopecz/grav-ganalytics/blob/master/README.md license: MIT form: validation: strict fields: - Basics: - type: section - title: PLUGIN_GANALYTICS.SECTION_GENERAL - underline: false - - enabled: - type: toggle - label: PLUGIN_ADMIN.PLUGIN_STATUS - hightlight: 1 - default: 0 - options: - 1: PLUGIN_ADMIN.ENABLED - 0: PLUGIN_ADMIN.DISABLED - validate: - type: bool - - trackingId: - type: text - size: medium - label: PLUGIN_GANALYTICS.TACKING_ID - help: PLUGIN_GANALYTICS.TACKING_ID_HELP - placeholder: "UA-00000000-0" - validate: - required: true - - Advanced: - type: section - title: PLUGIN_GANALYTICS.SECTION_ADVANCED - underline: true - - renameGa: - type: text - label: PLUGIN_GANALYTICS.RENAME_GA - help: PLUGIN_GANALYTICS.RENAME_GA_HELP - size: small - placeholder: "ga" - - anonymizeIp: - type: toggle - label: PLUGIN_GANALYTICS.ANONYMIZE_IP - help: PLUGIN_GANALYTICS.ANONYMIZE_IP_HELP - hightlight: 1 - default: 0 - options: - 1: PLUGIN_ADMIN.ENABLED - 0: PLUGIN_ADMIN.DISABLED - validate: - type: bool - - blockedIps: - type: selectize - size: large - label: PLUGIN_GANALYTICS.BLOCKED_IPS - help: PLUGIN_GANALYTICS.BLOCKED_IPS_HELP - validate: - type: commalist - - Debug: - type: section - title: PLUGIN_GANALYTICS.SECTION_DEBUG - underline: true - - debugStatus: - type: toggle - label: PLUGIN_GANALYTICS.DEBUG_STATUS - help: PLUGIN_GANALYTICS.DEBUG_STATUS_HELP - hightlight: 1 - default: 0 - options: - 1: PLUGIN_ADMIN.ENABLED - 0: PLUGIN_ADMIN.DISABLED - validate: - type: bool - - debugTrace: - type: toggle - label: PLUGIN_GANALYTICS.DEBUG_TRACE - help: PLUGIN_GANALYTICS.DEBUG_TRACE_HELP - hightlight: 1 - default: 0 - options: - 1: PLUGIN_ADMIN.ENABLED - 0: PLUGIN_ADMIN.DISABLED - validate: - type: bool \ No newline at end of file + tabs: + type: tabs + active: 1 + class: subtle + + fields: + + configuration: + type: tab + title: PLUGIN_GANALYTICS.SECTION_CONFIGURATION + fields: + + enabled: + type: toggle + label: PLUGIN_GANALYTICS.PLUGIN_STATUS + hightlight: 1 + default: 0 + options: + 1: PLUGIN_GANALYTICS.ENABLED + 0: PLUGIN_GANALYTICS.DISABLED + validate: + type: bool + + trackingId: + type: text + size: medium + label: PLUGIN_GANALYTICS.TACKING_ID + help: PLUGIN_GANALYTICS.TACKING_ID_HELP + placeholder: "UA-00000000-0" + validate: + required: true + + advanced: + type: section + title: PLUGIN_GANALYTICS.SECTION_ADVANCED + underline: true + fields: + + position: + type: toggle + label: PLUGIN_GANALYTICS.POSITION + help: PLUGIN_GANALYTICS.POSITION_HELP + hightlight: 1 + default: head + options: + head: PLUGIN_GANALYTICS.POSITION_HEAD + body: PLUGIN_GANALYTICS.POSITION_BODY + validate: + type: string + + objectName: + type: text + label: PLUGIN_GANALYTICS.OBJECT_NAME + help: PLUGIN_GANALYTICS.OBJECT_NAME_HELP + size: small + default: "ga" + + async: + type: toggle + label: PLUGIN_GANALYTICS.ASYNC + help: PLUGIN_GANALYTICS.ASYNC_HELP + hightlight: 1 + default: 0 + options: + 1: PLUGIN_GANALYTICS._YES + 0: PLUGIN_GANALYTICS._NO + validate: + type: bool + + forceSsl: + type: toggle + label: PLUGIN_GANALYTICS.FORCE_SSL + help: PLUGIN_GANALYTICS.FORCE_SSL_HELP + hightlight: 1 + default: 0 + options: + 1: PLUGIN_GANALYTICS._YES + 0: PLUGIN_GANALYTICS._NO + validate: + type: bool + + anonymizeIp: + type: toggle + label: PLUGIN_GANALYTICS.ANONYMIZE_IP + help: PLUGIN_GANALYTICS.ANONYMIZE_IP_HELP + hightlight: 1 + default: 0 + options: + 1: PLUGIN_GANALYTICS._YES + 0: PLUGIN_GANALYTICS._NO + validate: + type: bool + + blockedIps: + type: array + size: large + label: PLUGIN_GANALYTICS.BLOCKED_IPS + help: PLUGIN_GANALYTICS.BLOCKED_IPS_HELP + value_only: true + + cookie: + type: tab + title: PLUGIN_GANALYTICS.SECTION_COOKIE + fields: + cookieConfig: + type: toggle + label: PLUGIN_GANALYTICS.COOKIE_CONFIG + help: PLUGIN_GANALYTICS.COOKIE_CONFIG_HELP + hightlight: 1 + default: 0 + options: + 1: PLUGIN_GANALYTICS._YES + 0: PLUGIN_GANALYTICS._NO + validate: + type: bool + + cookieName: + type: text + label: PLUGIN_GANALYTICS.COOKIE_NAME + help: PLUGIN_GANALYTICS.COOKIE_NAME_HELP + size: small + default: "_ga" + + cookieDomain: + type: text + label: PLUGIN_GANALYTICS.COOKIE_DOMAIN + help: PLUGIN_GANALYTICS.COOKIE_DOMAIN_HELP + size: medium + + cookieExpires: + type: text + size: small + label: PLUGIN_GANALYTICS.COOKIE_EXPIRES + help: PLUGIN_GANALYTICS.COOKIE_EXPIRES_HELP + append: PLUGIN_GANALYTICS.SECONDS + default: 63072000 + validate: + type: number + min: 0 + + debug: + type: tab + title: PLUGIN_GANALYTICS.SECTION_DEBUG + fields: + debugStatus: + type: toggle + label: PLUGIN_GANALYTICS.DEBUG_STATUS + help: PLUGIN_GANALYTICS.DEBUG_STATUS_HELP + hightlight: 1 + default: 0 + options: + 1: PLUGIN_GANALYTICS.ENABLED + 0: PLUGIN_GANALYTICS.DISABLED + validate: + type: bool + + debugTrace: + type: toggle + label: PLUGIN_GANALYTICS.DEBUG_TRACE + help: PLUGIN_GANALYTICS.DEBUG_TRACE_HELP + hightlight: 1 + default: 0 + options: + 1: PLUGIN_GANALYTICS.ENABLED + 0: PLUGIN_GANALYTICS.DISABLED + validate: + type: bool \ No newline at end of file diff --git a/ganalytics.php b/ganalytics.php index 55a2c1f..f529477 100644 --- a/ganalytics.php +++ b/ganalytics.php @@ -23,71 +23,135 @@ class GanalyticsPlugin extends Plugin public static function getSubscribedEvents() { return [ + 'onPluginsInitialized' => ['onPluginsInitialized', 0], 'onAssetsInitialized' => ['onAssetsInitialized', 0] ]; } + /** + * Returns the Google Analytics cookie configuration. + * @return string + */ + private function getCookieConfiguration(){ + $cookie_config = $this->config->get('plugins.ganalytics.cookieConfig', false); + if (!$cookie_config) return "'auto'"; + + $cookie_config = [ + 'cookieName' => $this->config->get('plugins.ganalytics.cookieName', '_ga'), + 'cookieExpires' => $this->config->get('plugins.ganalytics.cookieExpires', 63072000), + ]; + + // cookie domain + $cookie_domain = trim($this->config->get('plugins.ganalytics.cookieDomain')); + if (!empty($cookie_domain)) $cookie_config['cookieDomain'] = $cookie_domain; + + return json_encode($cookie_config); + } + /** * Return the Google Analytics Tracking Code - * @param string $gaName Global variable name for the GA object + * @param string $scriptName Name of the GA script library + * @param string $objectName Global variable name for the GA object + * @param bool $async Determine if the GA script should be loaded and executed asynchronously * @return string */ - private function getTrackingCode($gaName) + private function getTrackingCode($scriptName, $objectName, $async=false) { - $script = $this->config->get('plugins.ganalytics.debugStatus', false) ? 'analytics_debug.js' : 'analytics.js'; - return - "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n". - "(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n". - "m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n". - "})(window,document,'script','//www.google-analytics.com/{$script}','{$gaName}');\n\n" - ; + if ($async) { + $code = + "window.GoogleAnalyticsObject = '{$objectName}';\n". + "window.{$objectName}=window.{$objectName}||function(){({$objectName}.q={$objectName}.q||[]).push(arguments)};{$objectName}.l=+new Date;\n" + ; + } else { + $code = + "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n". + "(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n". + "m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n". + "})(window,document,'script','//www.google-analytics.com/{$scriptName}.js','{$objectName}');\n" + ; + } + return $code; } /** * Return all personalized GA settings * @param string $trackingId Google Analytics Tracking ID - * @param string $gaName Global variable name for the GA object + * @param string $objectName Global variable name for the GA object * @return array */ - private function getTrackingSettings($trackingId, $gaName) + private function getTrackingSettings($trackingId, $objectName) { + $cookie_config = $this->getCookieConfiguration(); + $settings = [ 'trace-debug' => "window.ga_debug = {trace: true};", - 'create' => "{$gaName}('create', '{$trackingId}', 'auto');", - 'anonymize' => "{$gaName}('set', 'anonymizeIp', true);", - 'send' => "{$gaName}('send', 'pageview');" + 'create' => "{$objectName}('create', '{$trackingId}', {$cookie_config});", + 'anonymize' => "{$objectName}('set', 'anonymizeIp', true);", + 'force-ssl' => "{$objectName}('set', 'forceSSL', true);", + 'send' => "{$objectName}('send', 'pageview');" ]; if (!$this->config->get('plugins.ganalytics.debugTrace', false)) unset ($settings['trace-debug']); if (!$this->config->get('plugins.ganalytics.anonymizeIp', false)) unset ($settings['anonymize']); + if (!$this->config->get('plugins.ganalytics.forceSsl', false)) unset ($settings['force-ssl']); return $settings; } + /** + * Do something with deprecated settings + */ + private function processDeprecatedSettings() + { + // 1.3.0 => 1.4.0 + // Field: "renameGa" => "objectName" + $renameGa = trim($this->config->get('plugins.ganalytics.renameGa', '')); + if (!empty($renameGa)) { + $settings = $this->config->get('plugins.ganalytics', []); + $settings['objectName'] = $renameGa; + unset($settings['renameGa']); + $this->config->set('plugins.ganalytics', $settings); + Plugin::saveConfig('ganalytics'); + } + } + + // Handle deprecated stuff when the plugin is initialized + public function onPluginsInitialized() + { + $this->processDeprecatedSettings(); + } + /** * Add GA tracking JS when the assets are initialized */ public function onAssetsInitialized() { - if ($this->isAdmin()) return; // Return if we are in the Admin Plugin + // Don't proceed if we are in the admin plugin + if ($this->isAdmin()) return; - // Get the GA Tracking ID + // Don't proceed if there is no GA Tracking ID $trackingId = trim($this->config->get('plugins.ganalytics.trackingId', '')); if (empty($trackingId)) return; - // Maybe the IP is blocked + // Don't proceed if the IP address is blocked $blockedIps = $this->config->get('plugins.ganalytics.blockedIps', []); if (in_array($_SERVER['REMOTE_ADDR'], $blockedIps)) return; - // Global (ga) variable - $gaName = trim($this->config->get('plugins.ganalytics.renameGa', '')); - if (empty($gaName)) $gaName = 'ga'; + // Parameters + $scriptName = $this->config->get('plugins.ganalytics.debugStatus', false) ? 'analytics_debug' : 'analytics'; + $objectName = trim($this->config->get('plugins.ganalytics.objectName', 'ga')); + $async = $this->config->get('plugins.ganalytics.async', false); + $position = trim($this->config->get('plugins.ganalytics.position', 'head')); // Tracking Code and settings - $settings = $this->getTrackingSettings($trackingId, $gaName); - $code = $this->getTrackingCode($gaName); + $settings = $this->getTrackingSettings($trackingId, $objectName); + $code = $this->getTrackingCode($scriptName, $objectName, $async); $code.= join(PHP_EOL, $settings); - $this->grav['assets']->addInlineJs($code); + // Embed Google Analytics script + $group = ($position == 'body') ? 'bottom' : null; + + $this->grav['assets']->addInlineJs($code, null, $group); + if ($async) $this->grav['assets']->addJs("//www.google-analytics.com/{$scriptName}.js", 9 , true /*pipeline*/, 'async', $group); } } diff --git a/ganalytics.yaml b/ganalytics.yaml index 4f3a0fe..45ad6ce 100644 --- a/ganalytics.yaml +++ b/ganalytics.yaml @@ -1,6 +1,17 @@ -enabled: true # global enable/disable the entire plugin -trackingId: '' # GA tracking ID -anonymizeIp: false # IP Anonymization -renameGa: '' # GA Object renaming -debugStatus: false # Debugging Enabled/Disabled -debugTrace: false # Trace Debugging Enabled/Disabled \ No newline at end of file +enabled: true # Global enable/disable the entire plugin +trackingId: "" # GA Tracking ID `REQUIRED` + +position: "head" # Code Position in the HTML document +objectName: "ga" # Name for the global (ga) object +forceSsl: false # Enable/Disable SSL +async: false # Enable/Disable Asynchronously Tracking +anonymizeIp: false # Enable/Disable IP Anonymization +blockedIps: [] # Array of blocked IP addresses + +cookieConfig: false # Use custom cookie configuration +cookieName: "_ga" # Cookie name +cookieDomain: "" # Cookie domain +cookieExpires: 63072000 # Expiration time in seconds (Default: 2 years) + +debugStatus: false # Enable/disable Debugging +debugTrace: false # Enable/Disable Trace Debugging \ No newline at end of file diff --git a/languages.yaml b/languages.yaml deleted file mode 100644 index dbecc5d..0000000 --- a/languages.yaml +++ /dev/null @@ -1,35 +0,0 @@ -en: - PLUGIN_GANALYTICS: - SECTION_GENERAL: "General" - SECTION_ADVANCED: "Advanced" - SECTION_DEBUG: "Debug" - TACKING_ID: "Tracking ID" - TACKING_ID_HELP: "Google Analytics Tracking ID" - ANONYMIZE_IP: "IP Anonymization" - ANONYMIZE_IP_HELP: "Enable the anonymization of the IP address" - RENAME_GA: "(ga) Variable" - RENAME_GA_HELP: "Rename the global (ga) variable of the Google Analytics object" - BLOCKED_IPS: "Blocked IP addresses" - BLOCKED_IPS_HELP: "For the given IP addresses the Google Analytics code will not be embedded" - DEBUG_STATUS: "Debug Version" - DEBUG_STATUS_HELP: "Enable the debug version of the analytics.js library" - DEBUG_TRACE: "Trace Debugging" - DEBUG_TRACE_HELP: "Enabling trace debugging will output more verbose information to the console" - -de: - PLUGIN_GANALYTICS: - SECTION_GENERAL: "Allgemein" - SECTION_ADVANCED: "Erweitert" - SECTION_DEBUG: "Debugging" - TACKING_ID: "Tracking-ID" - TACKING_ID_HELP: "Google Analytics Tracking-ID" - ANONYMIZE_IP: "IP-Anonymisierung" - ANONYMIZE_IP_HELP: "Aktiviert die Anonymisierung der IP-Adresse" - RENAME_GA: "(ga) Variable" - RENAME_GA_HELP: "Umbenennung der globalen (ga)-Variable für das Google Analytics Objekt" - BLOCKED_IPS: "Gesperrte IP-Adressen" - BLOCKED_IPS_HELP: "Für die angegebenen IP-Adressen wird der Google Analytics Code nicht eingebunden." - DEBUG_STATUS: "Debug-Version" - DEBUG_STATUS_HELP: "Aktiviert die Debugging-Version der analytics.js Bibliothek" - DEBUG_TRACE: "Trace-Debugging" - DEBUG_TRACE_HELP: "Ausführlichere Informationen werden auf der Konsole ausgegeben" \ No newline at end of file diff --git a/languages/de.yaml b/languages/de.yaml new file mode 100644 index 0000000..3eda61d --- /dev/null +++ b/languages/de.yaml @@ -0,0 +1,39 @@ +PLUGIN_GANALYTICS: + _YES: "Ja" #BUG: Only "YES" or "NO" will not work! + _NO: "Nein" #BUG: Only "YES" or "NO" will not work! + ENABLED: "Aktiviert" + DISABLED: "Deaktiviert" + PLUGIN_STATUS: "Plugin Status" + SECONDS: "Sekunden" + SECTION_CONFIGURATION: "Einstellungen" + SECTION_ADVANCED: "Erweitert" + SECTION_COOKIE: "Cookie" + SECTION_DEBUG: "Debugging" + TACKING_ID: "Tracking-ID" + TACKING_ID_HELP: "Google Analytics Tracking-ID" + POSITION: "Code-Position" + POSITION_HELP: "Position des Codes im HTML-Dokument (Head oder Body)" + POSITION_HEAD: "Kopf" + POSITION_BODY: "Inhaltsende" + ASYNC: "Asynchron laden" + ASYNC_HELP: "Erlaubt es modernen Browsern das Google Analytics Script im Voraus zu laden" + FORCE_SSL: "SSL erzwingen" + FORCE_SSL_HELP: "Alle Daten werden mit SSL gesendet, auch von unsicheren (HTTP) Seiten" + ANONYMIZE_IP: "IP-Anonymisierung" + ANONYMIZE_IP_HELP: "Aktiviert die Anonymisierung der IP-Adresse" + OBJECT_NAME: "Globales (ga) Objekt" + OBJECT_NAME_HELP: "Variablenname des globalen Google Analytics Objekts (ga)" + BLOCKED_IPS: "Gesperrte IP-Adressen" + BLOCKED_IPS_HELP: "Für die angegebenen IP-Adressen wird der Google Analytics Code nicht eingebunden" + COOKIE_CONFIG: "Eigene Konfiguration" + COOKIE_CONFIG_HELP: "Soll eine eigene Cookie-Konfiguration oder die von Google Analytics genutzt werden" + COOKIE_NAME: "Name" + COOKIE_NAME_HELP: "Der Name des Google Analytics Cookie" + COOKIE_DOMAIN: "Domain" + COOKIE_DOMAIN_HELP: "Cookie Domain. Standardmäßig wird der Host-Name der aktuellen URL benutzt" + COOKIE_EXPIRES: "Läuft ab" + COOKIE_EXPIRES_HELP: "Die Ablaufzeit des Google Analytics Cookie. Standard sind zwei Jahre" + DEBUG_STATUS: "Debug-Version" + DEBUG_STATUS_HELP: "Aktiviert die Debugging-Version der analytics.js Bibliothek" + DEBUG_TRACE: "Trace-Debugging" + DEBUG_TRACE_HELP: "Ausführlichere Informationen werden auf der Konsole ausgegeben" \ No newline at end of file diff --git a/languages/en.yaml b/languages/en.yaml new file mode 100644 index 0000000..ae8ad9f --- /dev/null +++ b/languages/en.yaml @@ -0,0 +1,39 @@ +PLUGIN_GANALYTICS: + _YES: "Yes" #BUG: Only "YES" or "NO" will not work! + _NO: "No" #BUG: Only "YES" or "NO" will not work! + ENABLED: "Enabled" + DISABLED: "Disabled" + PLUGIN_STATUS: "Plugin status" + SECONDS: "seconds" + SECTION_CONFIGURATION: "Configuration" + SECTION_ADVANCED: "Advanced" + SECTION_COOKIE: "Cookie" + SECTION_DEBUG: "Debug" + TACKING_ID: "Tracking ID" + TACKING_ID_HELP: "Google Analytics Tracking ID" + POSITION: "Code Position" + POSITION_HELP: "Code Position in the HTML document (head or body)" + POSITION_HEAD: "Head" + POSITION_BODY: "End of Body" + ASYNC: "Load asynchronously" + ASYNC_HELP: "Allow modern browsers to preload the Google Analytics script" + FORCE_SSL: "Force SSL" + FORCE_SSL_HELP: "Send all data using SSL, even from insecure (HTTP) pages" + ANONYMIZE_IP: "IP Anonymization" + ANONYMIZE_IP_HELP: "Enable the anonymization of the IP address" + OBJECT_NAME: "Global (ga) Object" + OBJECT_NAME_HELP: "Rename the global (ga) variable of the Google Analytics object" + BLOCKED_IPS: "Blocked IP addresses" + BLOCKED_IPS_HELP: "For the given IP addresses the Google Analytics code will not be embedded" + COOKIE_CONFIG: "Custom Configuration" + COOKIE_CONFIG_HELP: "Use a custom cookie configuration instead of the default one" + COOKIE_NAME: "Name" + COOKIE_NAME_HELP: "The Name of the Google Analytics cookie" + COOKIE_DOMAIN: "Domain" + COOKIE_DOMAIN_HELP: "The Cookie domain. Default is the hostname of the current URL" + COOKIE_EXPIRES: "Expires" + COOKIE_EXPIRES_HELP: "The expiration time of the Google Analytics cookie. Default is two years" + DEBUG_STATUS: "Debug Version" + DEBUG_STATUS_HELP: "Enable the debug version of the analytics.js library" + DEBUG_TRACE: "Trace Debugging" + DEBUG_TRACE_HELP: "Enabling trace debugging will output more verbose information to the console" \ No newline at end of file