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

gtm_resource_path appends to url #179

Open JosephKastier opened 1 year ago

JosephKastier commented 1 year ago

Hey,

i'm using gtm_resource_path config entry to load the script from a different domain. This works as expected. But when i look into network tab, then i can see gtm_resource_path is appended to url. This is not necessary imho.

GoogleTagManagerModule.forRoot({
      id: 1337,
      gtm_resource_path: `https://foo.com/gtm.js`,
    }),

=> Network Tab:

Request URL: https://foo.com/gtm.js?id=1337&gtm_resource_path=https://foo.com/gtm.js