Releases: inpsyde/google-tag-manager
3.0.0-beta.2
Refactor DataLayer and Collectors
The DataLayer
and DataCollectors
were refactored and are now required to be registered to the Service\DataCollectorRegistry
which is being used by the DataLayer
. Additionally, the Collectors are not require anymore to implement enabled()
and isAllowed()
. The DataLayer itself will contain the state of "enabled/disabled" of Collectors. Additionally, Collector:data()
can now return null
, when the current view does not generate any data.
Settings revamp
The Settings have been completely rewritten and are now managed with Gutenberg Components on the page. A new REST Endpoint has been introduced which is being used to get and update the settings.
More (breaking) changes
- The
AuthorDataCollector
has been merged with thePostDataCollector
. RendererProvider
does not resolve dependencies lazy and not directly on registration.Http\Request
has been removed.- A new
SearchDataCollector
has been introduced. DataCollectorInterface
has now "id()", "name()" and "description()" as new methods.
Removed dependencies
Following dependencies have been removed from the Plugin:
- inpsyde/assets
- chrico/wp-fields
- brain/wp-nonces
Raise of required versions
PHP is now required in at least v8.1 and Node in v18.
E2E Testing
E2E Testing with playwright has been added to the repository and is being executed in a GitHub Action through wp-env.
Quality
- All PHP GA are now using min PHP 8.1
- All Node GA are now using Node 18.
What's Changed
Full Changelog: 2.2.0...3.0.0-beta.1
3.0.0-beta.1
Refactor DataLayer and Collectors
The DataLayer
and DataCollectors
were refactored and are now required to be registered to the Service\DataCollectorRegistry
which is being used by the DataLayer
. Additionally, the Collectors are not require anymore to implement enabled()
and isAllowed()
. The DataLayer itself will contain the state of "enabled/disabled" of Collectors. Additionally, Collector:data()
can now return null
, when the current view does not generate any data.
Settings revamp
The Settings have been completely rewritten and are now managed with Gutenberg Components on the page. A new REST Endpoint has been introduced which is being used to get and update the settings.
More (breaking) changes
- The
AuthorDataCollector
has been merged with thePostDataCollector
. RendererProvider
does not resolve dependencies lazy and not directly on registration.Http\Request
has been removed.- A new
SearchDataCollector
has been introduced. DataCollectorInterface
has now "id()", "name()" and "description()" as new methods.
Removed dependencies
Following dependencies have been removed from the Plugin:
- inpsyde/assets
- chrico/wp-fields
- brain/wp-nonces
Raise of required versions
PHP is now required in at least v8.1 and Node in v18.
E2E Testing
E2E Testing with playwright has been added to the repository and is being executed in a GitHub Action through wp-env.
Quality
- All PHP GA are now using min PHP 8.1
- All Node GA are now using Node 18.
What's Changed
Full Changelog: 2.2.0...3.0.0-beta.1
2.2.0
What's Changed
- chore: rebrand, license and copyright by @yeremi in #24
- chore: rebrand by @yeremi in #25
- fix: fixed cs and unit testing by @luislard in #28 and #27
- pre-compile-assets.yml // update node version to 20 by @Chrico in #29
- Switch the way the package compiles assets by @luislard in #26
New Contributors
Full Changelog: 2.1.0...2.2.0
2.1.0
2.0.0
Breaking changes
This version removes the custom psr/container
-implementation and upgrades to inpsyde/modularity
as base.
You now need to use inspyde/modularity
to hook into the Plugin like following:
<?php
use Inpsyde\Modularity\Package;
use function Inpsyde\GoogleTagManager\plugin;
add_action(
plugin()->hookName(Package::ACTION_INIT),
static function (Package $plugin): void {
$plugin->addModule(new MyModule());
}
);
Read more about "Access from external" in our documentation: https://inpsyde.github.io/modularity/Package/#access-from-external.
Removed BootstrapEvent
Due the change to inpsyde/modularity
, we now no longer need Inpsyde\GoogleTagManager\Event\BootstrapEvent::ACTION
.
Removed ConfigBuilder
and PluginConfig
Those 2 classes were no longer needed. We can now use the Inpsyde\Modularity\Properties\PluginProperties
to access all required data.
Restructure of code
The code structure is now more flat which was also adapted to the identifier in the container.
*Provider
All providers were moved from Inpsyde\GoogleTagManager\App\Provider
to Inpsyde\GoogleTagManager\Provider
SiteInfoDataCollector
- namespace from
Inpsyde\GoogleTagManager\DataLayer\Site
toInpsyde\GoogleTagManager\DataLayer
- identfier from
DataLayer.Site.SiteInfoDataCollector
toDataLayer.SiteInfoDataCollector
.
UserDataCollector
- namespace from
Inpsyde\GoogleTagManager\DataLayer\User
toInpsyde\GoogleTagManager\DataLayer
- identfier from
DataLayer.User.UserDataCollector
toDataLayer.UserDataCollector
.
Upgrade of chrico/wp-fields
Additionally we now support chrico/wp-fields
version 2, which also removes pimple/pimple
, inpsyde/validator
and inpsyde/filter
as dependency.
PHP min version
The PHP min support was raised fro 7.2 to 8.0.
QoL
- php-qa.yml // ad lint-php and coding-standards via inpsyde/reusable-workflows.
- assets-compiler // update GA and configuration to make use of wordpress/scripts.
- package.json // add "license", "keywords", "homepage" and "bugs".
1.6.2
1.6.1
Removes additional '>' bracket which was printed after the GTM ID due to a typo.
1.6.1
Pre-compiled assets available in assets-1.6.1.zip
.
1.6
New Features
- DataLayerRendererEvent // rename constant for
FILTER_SCRIPT_ATTRIBUTES
. - Introduce new
PrintInlineScriptTrait
. UpdateDataLayerRenderer
andGtmScriptTagRenderer
to make use of trait. - GtmScriptTagRenderer // implemented new
wp_print_inline_script_tag()
function and fallback. allowing now to filter$script
and$attributes
.
Improvements
- update to php >= 7.2 min. update to PHPUnit 8
- Add composer.scripts for phpcs and phpunit. Add codecov to Github Action.
1.5
Improvements
Make use of wp_body_open
which was introduced with WordPress 5.2.0, instead of hacking into body_class
for rendering the <noscript>
tag after <body>
opened.
Hacking into body_class
and closing the class
attribute early did not work anymore since WordPress 5.5 where esc_attr
was added.