Closed ma7moudat closed 1 year ago
Struggling with the same issue here, +1!
works fine with empty string ;-) BUT the tags will still be fired (and will respond with an HTTP 400 😂 👌)
Would be awesome to still have the Angular service (to not break existing calls) but not load the google-tag-manager lib nor trigger the API calls 🙇
In the meantime, we added checks to see if this.gtmService.googleTagManagerId
is valid to trigger or not the pushTag
Hey there, can you check out if the PR fixes this? We had a similar issue and this was a good solution.
Background:
googleTagManagerId
causes an error and breaks the whole application.This doesn't make much sense, since GTM is not a crucial piece of code and the project should be able to run without it. Kind of an opt-in feature.
This means, when the settings are not valid, an error should not be thrown; maybe just a console warning instead hinting to the facts that tags can't be pushed.