From c855c2fc88213d285c14141f62ce6e06e2948634 Mon Sep 17 00:00:00 2001 From: floppy0 <31189947+floppy0@users.noreply.github.com> Date: Fri, 23 Mar 2018 15:07:06 +0100 Subject: [PATCH] Google Analytics with EU GDPR --- bl-plugins/google-analytics/languages/en.json | 14 +++ bl-plugins/google-analytics/metadata.json | 10 ++ bl-plugins/google-analytics/plugin.php | 113 ++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 bl-plugins/google-analytics/languages/en.json create mode 100644 bl-plugins/google-analytics/metadata.json create mode 100644 bl-plugins/google-analytics/plugin.php diff --git a/bl-plugins/google-analytics/languages/en.json b/bl-plugins/google-analytics/languages/en.json new file mode 100644 index 00000000..0851e093 --- /dev/null +++ b/bl-plugins/google-analytics/languages/en.json @@ -0,0 +1,14 @@ +{ + "plugin-data": + { + "name": "Google Analytics", + "description": "This plugin generates the necessary code for the following Google tools: Google Analytics, Google Tag Manager and Google Site Verification HTML Tag." + }, + + "google-webmasters-tools": "Google Webmasters tools", + "google-analytics-tracking-id": "Google Analytics Tracking ID", + "google-tag-manager": "Google Tag Manager", + "complete-this-field-with-the-google-site-verification": "Complete this field with the Google Site verification to verify the site owner.", + "complete-this-field-with-the-tracking-id": "Complete this field with the Tracking ID to generate the Javascript tracking code for Google Analytics.", + "complete-this-field-with-the-tracking-id-google-tag": "Complete this field with the Tracking ID to generate the Javascript tracking code for Google Tag Manager." +} \ No newline at end of file diff --git a/bl-plugins/google-analytics/metadata.json b/bl-plugins/google-analytics/metadata.json new file mode 100644 index 00000000..13635940 --- /dev/null +++ b/bl-plugins/google-analytics/metadata.json @@ -0,0 +1,10 @@ +{ + "author": "Bludit", + "email": "", + "website": "https://plugins.bludit.com", + "version": "2.3", + "releaseDate": "2018-01-23", + "license": "MIT", + "compatible": "2.3", + "notes": "" +} \ No newline at end of file diff --git a/bl-plugins/google-analytics/plugin.php b/bl-plugins/google-analytics/plugin.php new file mode 100644 index 00000000..5f51f201 --- /dev/null +++ b/bl-plugins/google-analytics/plugin.php @@ -0,0 +1,113 @@ +dbFields = array( + 'EUGDPR'=>true, + 'trackingID'=>'' + ); + } + + public function form() + { + global $Language; + + $html = '