Skip to content

Commit

Permalink
Merge pull request #45 from FrittenKeeZ/patch-1
Browse files Browse the repository at this point in the history
Fixed dataLayer variables set through facade not being outputted
  • Loading branch information
freekmurze committed Dec 15, 2021
2 parents 87d3ff5 + 1d6b46f commit 19f257e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GoogleTagManagerServiceProvider.php
Expand Up @@ -35,7 +35,7 @@ public function register()
{
$this->mergeConfigFrom(__DIR__.'/../resources/config/config.php', 'googletagmanager');

$this->app->bind('Spatie\GoogleTagManager\GoogleTagManager', function($app) {
$this->app->singleton(GoogleTagManager::class, function($app) {
$googleTagManager = new GoogleTagManager(config('googletagmanager.id'));

if (config('googletagmanager.enabled') === false) {
Expand All @@ -44,7 +44,7 @@ public function register()

return $googleTagManager;
});
$this->app->alias('Spatie\GoogleTagManager\GoogleTagManager', 'googletagmanager');
$this->app->alias(GoogleTagManager::class, 'googletagmanager');

if (is_file(config('googletagmanager.macroPath'))) {
include config('googletagmanager.macroPath');
Expand Down

0 comments on commit 19f257e

Please sign in to comment.