This guide will help you upgrade from Adwise Analytics 1.x to 2.x. This guide assumes you already have a working 1.x version of the module installed.
composer require adwise/magento2-gamp:^2.0
php bin/magento setup:upgrade
GA4 has made changes to the way data should be passed into the Measurement Protocol, this means you need to update your data providers to match the new format.
First, make sure your data providers extend the new Adwise\Analytics\Api\MeasurementProtocol
interfaces instead of the deprecated Adwise\Analytics\Api
interfaces.
Adwise\Analytics\Api\OrderDataProviderInterface
has becomeAdwise\Analytics\Api\MeasurementProtocol\OrderDataProviderInterface
- Watch out You can no longer send custom dimensions in these providers. You need to use the new
UserPropertyProviderInterface
for sending custom data to GA4
- Watch out You can no longer send custom dimensions in these providers. You need to use the new
Adwise\Analytics\Api\CreditMemoProviderInterface
has becomeAdwise\Analytics\Api\MeasurementProtocol\CreditMemoProviderInterface
- Watch out You can no longer send custom dimensions in these providers. You need to use the new
UserPropertyProviderInterface
for sending custom data to GA4
- Watch out You can no longer send custom dimensions in these providers. You need to use the new
The places where you need to hook your data providers into the module have changed. Below is a list of the changed hooks, new hooks can be found in etc/di.xml
Adwise\Analytics\Model\OrderDataProviders
has becomeAdwise\Analytics\Model\MP\OrderDataProviders
Adwise\Analytics\Model\CreditMemoDataProviders
has becomeAdwise\Analytics\Model\MP\CreditMemoDataProviders
A number of configuration options have been moved or removed. Please reconfigure the module according to the instructions in the README