2021-07-17 23:22:23 +02:00
|
|
|
<?php
|
2023-06-21 15:23:50 +02:00
|
|
|
|
2024-05-29 11:39:53 +02:00
|
|
|
use D3\GoogleAnalytics4\Application\Controller\Admin\GA4AdminUserInterface_main as GA4AdminUserInterfaceMainController;
|
2024-03-25 09:06:22 +01:00
|
|
|
use D3\GoogleAnalytics4\Application\Model\Constants as Constants;
|
2023-11-02 13:36:44 +01:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Component\d3GtmBasketComponentExtension;
|
2024-01-25 14:49:32 +01:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Component\Widget\d3GtmWidgetArticleDetails as d3GtmWidgetArticleDetails;
|
2023-11-07 10:59:39 +01:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Controller\ArticleDetailsController;
|
2023-11-02 13:36:44 +01:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Controller\ArticleListController_AddToCartHelpMethods;
|
2023-08-03 14:57:26 +02:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Controller\BasketController;
|
2023-11-07 15:23:40 +01:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Controller\d3GtmAccountNoticeListController;
|
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Controller\d3GtmAccountRecommlistController;
|
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Controller\d3GtmAccountWishlistController;
|
2024-01-25 14:49:32 +01:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Controller\d3GtmManufacturerListController as d3GtmManufacturerListController;
|
2024-01-17 15:32:35 +01:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Controller\d3GtmSearchController;
|
2023-12-18 11:23:43 +01:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Controller\d3GtmStartController;
|
2023-08-17 09:20:58 +02:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Controller\ThankYouController;
|
2023-06-22 10:37:09 +02:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Model\Basket as Basket;
|
2023-06-21 15:23:50 +02:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Model\Category as Category;
|
2023-08-15 11:52:46 +02:00
|
|
|
use D3\GoogleAnalytics4\Modules\Application\Model\Manufacturer as Manufacturer;
|
2023-01-19 15:31:56 +01:00
|
|
|
use D3\GoogleAnalytics4\Modules\Core\ViewConfig;
|
2023-11-02 13:36:44 +01:00
|
|
|
use OxidEsales\Eshop\Application\Component\BasketComponent as OEBasketComponent;
|
2024-01-25 14:49:32 +01:00
|
|
|
use OxidEsales\Eshop\Application\Component\Widget\ArticleDetails as OEArticleDetails;
|
2023-11-07 15:23:40 +01:00
|
|
|
use OxidEsales\Eshop\Application\Controller\AccountNoticeListController as OEAccountNoticeListController;
|
|
|
|
use OxidEsales\Eshop\Application\Controller\AccountRecommlistController as OEAccountRecommlistController;
|
|
|
|
use OxidEsales\Eshop\Application\Controller\AccountWishlistController as OEAccountWishlistController;
|
2023-11-07 10:59:39 +01:00
|
|
|
use OxidEsales\Eshop\Application\Controller\ArticleDetailsController as OEArticleDetailsController;
|
2023-11-02 13:36:44 +01:00
|
|
|
use OxidEsales\Eshop\Application\Controller\ArticleListController as OEArticleListController;
|
2023-08-03 14:57:26 +02:00
|
|
|
use OxidEsales\Eshop\Application\Controller\BasketController as OEBasketController;
|
2024-01-25 14:49:32 +01:00
|
|
|
use OxidEsales\Eshop\Application\Controller\ManufacturerListController as OEManufacturerListController;
|
2024-01-17 15:32:35 +01:00
|
|
|
use OxidEsales\Eshop\Application\Controller\SearchController as OESearchController;
|
2023-12-18 11:23:43 +01:00
|
|
|
use OxidEsales\Eshop\Application\Controller\StartController as OEStartController;
|
2023-08-17 09:20:58 +02:00
|
|
|
use OxidEsales\Eshop\Application\Controller\ThankYouController as OEThankYouController;
|
2023-06-22 10:37:09 +02:00
|
|
|
use OxidEsales\Eshop\Application\Model\Basket as OEBasket;
|
2023-06-21 15:23:50 +02:00
|
|
|
use OxidEsales\Eshop\Application\Model\Category as OECategory;
|
2023-08-15 11:52:46 +02:00
|
|
|
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
|
2023-01-19 15:31:56 +01:00
|
|
|
use OxidEsales\Eshop\Core\ViewConfig as OEViewConfig;
|
2021-07-17 23:22:23 +02:00
|
|
|
|
|
|
|
$sMetadataVersion = '2.1';
|
2022-06-09 20:41:59 +02:00
|
|
|
$aModule = [
|
2024-03-25 09:06:22 +01:00
|
|
|
'id' => Constants::OXID_MODULE_ID,
|
2023-01-19 15:31:56 +01:00
|
|
|
'title' => 'Google Analytics 4',
|
2023-01-20 09:33:36 +01:00
|
|
|
'description' => "Dieses Modul bietet die Möglichkeit in Ihrem OXID eShop (6.x) die neue 'Property'
|
|
|
|
Google Analytics 4 (GA4) von Google zu integrieren.<br>
|
|
|
|
Hierfür stehen Ihnen verschiedene 'templates' zur verfügung,
|
|
|
|
mit denen Sie bestimmte Events tracken können.<br>
|
2023-01-20 11:04:22 +01:00
|
|
|
Beispiele dafür sind: view_item, add_to_basket, purchase, ...<br><br>
|
|
|
|
Die Integration und Verbindung zu Google wird mithilfe des gtag (Google Tag Manager) realisiert.<br><br>
|
|
|
|
Weiterführende Informationen: https://developers.google.com/analytics/devguides/collection/ga4<br>
|
|
|
|
<hr>
|
|
|
|
Die Entwicklung basiert auf einem Fork von Marat Bedoev - <a href='https://github.com/vanilla-thunder/oxid-module-gtm'>Github-Link</a>
|
2023-01-20 09:33:36 +01:00
|
|
|
",
|
2022-06-09 20:41:59 +02:00
|
|
|
'thumbnail' => 'thumbnail.png',
|
2024-06-25 11:22:18 +02:00
|
|
|
'version' => '2.18.2',
|
2023-01-19 15:31:56 +01:00
|
|
|
'author' => 'Data Development (Inh.: Thomas Dartsch)',
|
|
|
|
'email' => 'support@shopmodule.com',
|
|
|
|
'url' => 'https://www.oxidmodule.com/',
|
2024-05-29 11:39:53 +02:00
|
|
|
'controllers' => [
|
|
|
|
'd3googleanalytics4_main' => GA4AdminUserInterfaceMainController::class
|
|
|
|
],
|
2022-06-09 20:41:59 +02:00
|
|
|
'extend' => [
|
2024-01-25 14:49:32 +01:00
|
|
|
// Core
|
2023-11-07 15:23:40 +01:00
|
|
|
OEViewConfig::class => ViewConfig::class,
|
2024-01-25 14:49:32 +01:00
|
|
|
|
|
|
|
// Model
|
2023-11-07 15:23:40 +01:00
|
|
|
OECategory::class => Category::class,
|
|
|
|
OEBasket::class => Basket::class,
|
|
|
|
OEManufacturer::class => Manufacturer::class,
|
2024-01-25 14:49:32 +01:00
|
|
|
|
|
|
|
// Controller
|
|
|
|
OEBasketController::class => BasketController::class,
|
2023-11-07 15:23:40 +01:00
|
|
|
OEThankYouController::class => ThankYouController::class,
|
|
|
|
OEArticleListController::class => ArticleListController_AddToCartHelpMethods::class,
|
|
|
|
OEArticleDetailsController::class => ArticleDetailsController::class,
|
|
|
|
OEAccountNoticeListController::class => d3GtmAccountNoticeListController::class,
|
|
|
|
OEAccountRecommlistController::class => d3GtmAccountRecommlistController::class,
|
2023-12-18 11:23:43 +01:00
|
|
|
OEAccountWishlistController::class => d3GtmAccountWishlistController::class,
|
2024-01-17 15:32:35 +01:00
|
|
|
OEStartController::class => d3GtmStartController::class,
|
2024-01-25 14:49:32 +01:00
|
|
|
OESearchController::class => d3GtmSearchController::class,
|
|
|
|
OEManufacturerListController::class => d3GtmManufacturerListController::class,
|
|
|
|
|
|
|
|
// Component
|
|
|
|
OEArticleDetails::class => d3GtmWidgetArticleDetails::class,
|
|
|
|
OEBasketComponent::class => d3GtmBasketComponentExtension::class,
|
2023-11-07 10:59:39 +01:00
|
|
|
],
|
|
|
|
'templates' => [
|
2024-01-02 16:07:53 +01:00
|
|
|
// Event files that store the GA4 Event-Information
|
|
|
|
'event/add_to_cart.tpl' => 'd3/googleanalytics4/Application/views/event/add_to_cart.tpl',
|
|
|
|
'event/view_item.tpl' => 'd3/googleanalytics4/Application/views/event/view_item.tpl',
|
|
|
|
'event/view_cart.tpl' => 'd3/googleanalytics4/Application/views/event/view_cart.tpl',
|
|
|
|
'event/purchase.tpl' => 'd3/googleanalytics4/Application/views/event/purchase.tpl',
|
|
|
|
'event/view_item_list.tpl' => 'd3/googleanalytics4/Application/views/event/view_item_list.tpl',
|
|
|
|
'event/view_search_result.tpl' => 'd3/googleanalytics4/Application/views/event/view_search_result.tpl',
|
|
|
|
'event/remove_from_cart.tpl' => 'd3/googleanalytics4/Application/views/event/remove_from_cart.tpl',
|
2023-11-07 15:23:40 +01:00
|
|
|
|
|
|
|
// complete overwritten file of OXID-Originals
|
|
|
|
// the path of the template-name is the original path to the file in OXID-context from tpl/->
|
|
|
|
'page/account/d3gtmnoticelist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmnoticelist.tpl',
|
|
|
|
'page/account/d3gtmrecommendationlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmrecommendationlist.tpl',
|
|
|
|
'page/account/d3gtmwishlist.tpl' => 'd3/googleanalytics4/Application/views/tpl/page/account/d3gtmwishlist.tpl',
|
2024-05-29 11:39:53 +02:00
|
|
|
|
|
|
|
// Admin Templates
|
|
|
|
'ga4/admin/d3ga4uimain.tpl' => 'd3/googleanalytics4/Application/views/admin/tpl/d3googleanalytics4_main.tpl',
|
2024-05-29 15:48:29 +02:00
|
|
|
'ga4/admin/d3ga4uiheaditem.tpl' => 'd3/googleanalytics4/Application/views/admin/tpl/d3googleanalytics4_headitem.tpl',
|
2021-07-17 23:22:23 +02:00
|
|
|
],
|
2022-06-09 20:41:59 +02:00
|
|
|
'blocks' => [
|
2021-07-17 23:22:23 +02:00
|
|
|
// tag manager js
|
|
|
|
[
|
|
|
|
'template' => 'layout/base.tpl',
|
2022-06-09 20:41:59 +02:00
|
|
|
'block' => 'head_meta_robots',
|
2023-05-24 11:09:36 +02:00
|
|
|
'file' => '/Application/views/blocks/_gtm_js.tpl',
|
|
|
|
'position' => 150
|
2021-07-17 23:22:23 +02:00
|
|
|
],
|
|
|
|
// tag manager nojs
|
|
|
|
[
|
|
|
|
'template' => 'layout/base.tpl',
|
2022-06-09 20:41:59 +02:00
|
|
|
'block' => 'theme_svg_icons',
|
|
|
|
'file' => '/Application/views/blocks/_gtm_nojs.tpl'
|
2021-07-17 23:22:23 +02:00
|
|
|
],
|
|
|
|
// details
|
|
|
|
[
|
|
|
|
'template' => 'page/details/inc/productmain.tpl',
|
2022-06-09 20:41:59 +02:00
|
|
|
'block' => 'details_productmain_title',
|
2023-05-23 10:06:21 +02:00
|
|
|
'file' => '/Application/views/blocks/view_item.tpl',
|
2023-01-16 15:25:59 +01:00
|
|
|
'position' => 150
|
2021-07-17 23:22:23 +02:00
|
|
|
],
|
|
|
|
// checkout
|
|
|
|
[
|
|
|
|
'template' => 'page/checkout/basket.tpl',
|
2022-06-09 20:41:59 +02:00
|
|
|
'block' => 'checkout_basket_main',
|
2023-06-21 15:23:50 +02:00
|
|
|
'file' => '/Application/views/blocks/view_cart.tpl'
|
2021-07-17 23:22:23 +02:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'template' => 'page/checkout/thankyou.tpl',
|
2022-06-09 20:41:59 +02:00
|
|
|
'block' => 'checkout_thankyou_main',
|
2023-06-21 15:47:06 +02:00
|
|
|
'file' => '/Application/views/blocks/purchase.tpl'
|
2023-01-10 14:22:49 +01:00
|
|
|
],
|
|
|
|
// Lists
|
|
|
|
// view_item_list
|
|
|
|
[
|
2023-05-30 16:41:59 +02:00
|
|
|
'template' => 'page/list/list.tpl',
|
|
|
|
'block' => 'page_list_productlist',
|
2024-01-02 16:07:53 +01:00
|
|
|
'file' => '/Application/views/blocks/view_item_list.tpl',
|
2023-01-26 15:31:45 +01:00
|
|
|
'position' => 150
|
2023-01-10 15:49:54 +01:00
|
|
|
],
|
|
|
|
// view_search_result
|
|
|
|
[
|
|
|
|
'template' => 'page/search/search.tpl',
|
|
|
|
'block' => 'search_results',
|
2024-01-02 16:07:53 +01:00
|
|
|
'file' => '/Application/views/blocks/view_search_result.tpl',
|
2023-01-26 15:31:45 +01:00
|
|
|
'position' => 150
|
2023-01-11 14:43:13 +01:00
|
|
|
],
|
|
|
|
// add_to_cart
|
|
|
|
[
|
|
|
|
'template' => 'page/details/inc/productmain.tpl',
|
|
|
|
'block' => 'details_productmain_tobasket',
|
2023-11-07 10:59:39 +01:00
|
|
|
'file' => '/Application/views/blocks/details_productmain_tobasket.tpl',
|
2023-01-26 09:09:09 +01:00
|
|
|
'position' => 150
|
2023-08-17 08:51:02 +02:00
|
|
|
],
|
2023-11-02 13:36:44 +01:00
|
|
|
[
|
|
|
|
'template' => 'page/list/list.tpl',
|
|
|
|
'block' => 'page_list_listbody',
|
2023-11-07 10:59:39 +01:00
|
|
|
'file' => '/Application/views/blocks/page_list_listbody.tpl',
|
2023-11-02 13:36:44 +01:00
|
|
|
'position' => 150
|
|
|
|
],
|
2023-12-18 11:23:43 +01:00
|
|
|
[
|
|
|
|
'template' => 'page/shop/start.tpl',
|
|
|
|
'block' => 'start_welcome_text',
|
|
|
|
'file' => '/Application/views/blocks/start_welcome_text.tpl',
|
2023-01-26 09:09:09 +01:00
|
|
|
'position' => 150
|
2023-08-03 14:57:26 +02:00
|
|
|
],
|
|
|
|
// remove_from_cart
|
|
|
|
[
|
|
|
|
'template' => 'page/checkout/basket.tpl',
|
|
|
|
'block' => 'checkout_basket_main',
|
2024-01-02 16:07:53 +01:00
|
|
|
'file' => '/Application/views/blocks/remove_from_cart.tpl',
|
2023-08-03 14:57:26 +02:00
|
|
|
'position' => 150
|
2021-07-17 23:22:23 +02:00
|
|
|
]
|
2024-06-03 12:02:44 +02:00
|
|
|
],
|
|
|
|
'events' => [
|
|
|
|
'onActivate' => '\D3\GoogleAnalytics4\Setup\Events::onActivate',
|
|
|
|
'onDeactivate' => '\D3\GoogleAnalytics4\Setup\Events::onDeactivate',
|
|
|
|
],
|
2021-07-17 23:22:23 +02:00
|
|
|
];
|