diff --git a/Setup/Actions.php b/Setup/Actions.php new file mode 100644 index 0000000..ff577d6 --- /dev/null +++ b/Setup/Actions.php @@ -0,0 +1,30 @@ +saveShopConfVar( + $sVarType, + Constants::OXID_MODULE_ID.$sSettingName, + $sSettingValue, + $oConfig->getShopId(), + Constants::OXID_MODULE_ID + ); + } +} \ No newline at end of file diff --git a/Setup/Events.php b/Setup/Events.php new file mode 100644 index 0000000..aa0d67e --- /dev/null +++ b/Setup/Events.php @@ -0,0 +1,37 @@ +d3SaveDefaultSettings( + 'str', + '_sServersidetagging_js', + 'https://www.googletagmanager.com/gtm.js' + ); + $oActions->d3SaveDefaultSettings( + 'str', + '_sServersidetagging_js', + 'https://www.googletagmanager.com/ns.html' + ); + $oActions->d3SaveDefaultSettings( + 'str', + '_sContainerID', + 'GTM-' + ); + } + + /** + * @return void + */ + public static function onDeactivate(){} +} \ No newline at end of file diff --git a/metadata.php b/metadata.php index 98c07e1..447e519 100755 --- a/metadata.php +++ b/metadata.php @@ -175,5 +175,9 @@ $aModule = [ 'file' => '/Application/views/blocks/remove_from_cart.tpl', 'position' => 150 ] - ] + ], + 'events' => [ + 'onActivate' => '\D3\GoogleAnalytics4\Setup\Events::onActivate', + 'onDeactivate' => '\D3\GoogleAnalytics4\Setup\Events::onDeactivate', + ], ]; \ No newline at end of file