mzuccaroli / angular-google-tag-manager

A service library for integrate google tag manager in your angular project
https://itnext.io/how-to-add-google-tag-manager-to-an-angular-application-fc68624386e2
MIT License
136 stars 78 forks source link

Fix #171 and added "silent mode" #177

Closed pm20390 closed 1 year ago

pm20390 commented 1 year ago

Fix #171 where the public-api was missing an export.

Added a feature my team needed that I've called "silent mode", where instead of throwing an error when the GTM id is null, it will simply return false. This is especially useful for dynamically loaded GTM ids that may not always be available or valid. It looks for an injection token "googleTagManagerMode" specified as "silent" or "noisy" (defaults to "noisy") to determine the behavior.

pm20390 commented 1 year ago

"Silent mode" fixes #158 as well I believe.

mzuccaroli commented 1 year ago

hi @pm20390 i have some troubles in merging your PM thik because you renamed the main fork branc

"Couldn't find branch 'master' in remote 'github-desktop-pm20390'. A common reason for this is that the PR author has deleted their branch or their forked repository."

pm20390 commented 1 year ago

@mzuccaroli sorry about that, I will try to resolve that tomorrow.