Skip to content

Commit

Permalink
1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Wagner committed Jun 21, 2018
1 parent 4990c57 commit 1074488
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.0.5] - 2018-06-21
- fixed template

## [1.0.4] - 2018-06-21
- do not output google tag manager script as uncached insert tag

Expand Down
4 changes: 1 addition & 3 deletions src/Resources/views/headScript.html.twig
@@ -1,4 +1,3 @@
<!-- Google Tag Manager -->
{% if dataLayerValues|default() %}
dataLayer = [
{
Expand All @@ -22,5 +21,4 @@ j.async = true;
j.src =
'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', '{{ containerId }}');
<!-- End Google Tag Manager -->
})(window, document, 'script', 'dataLayer', '{{ containerId }}');
7 changes: 3 additions & 4 deletions tests/Manager/GoogleTagManagerTest.php
Expand Up @@ -57,8 +57,8 @@ public function testGetHeadScript()
{
$tagManager = new GoogleTagManager();

$this->assertSame('<!-- Google Tag Manager -->
dataLayer = [
$this->assertSame(
' dataLayer = [
{
\'test\': \'test\',
}];
Expand All @@ -75,8 +75,7 @@ public function testGetHeadScript()
j.src =
\'https://www.googletagmanager.com/gtm.js?id=\' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, \'script\', \'dataLayer\', \'GTM-XXX\');
<!-- End Google Tag Manager -->', $tagManager->getHeadScript('GTM-XXX', ['test' => 'test']));
})(window, document, \'script\', \'dataLayer\', \'GTM-XXX\');', $tagManager->getHeadScript('GTM-XXX', ['test' => 'test']));
}

public function testGetBodyScript()
Expand Down

0 comments on commit 1074488

Please sign in to comment.