Skip to content

Commit

Permalink
Changed default values of the gtag library to align with google recom…
Browse files Browse the repository at this point in the history
…mendations
  • Loading branch information
loevgaard committed Jun 30, 2020
1 parent bc16ce6 commit 9f55ed2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Tag/GtagLibrary.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ public function __construct(string $id)
'id' => $id,
]);

$this->setName(self::NAME);
$this->setUnique(true);
$this->setName(self::NAME)
->setUnique(true)
->setSection(TagInterface::SECTION_HEAD)
->setPriority(128)
;
}
}
2 changes: 2 additions & 0 deletions tests/Tag/GtagLibraryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public function it_has_default_values(): void
$tag = new GtagLibrary('id');

$this->assertSame('@SetonoTagBagGtag/library', $tag->getTemplate());
$this->assertSame(TagInterface::SECTION_HEAD, $tag->getSection());
$this->assertSame(128, $tag->getPriority());
}

/**
Expand Down

0 comments on commit 9f55ed2

Please sign in to comment.