Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add rel="preconnect" #163

Open
17agustin opened this issue May 18, 2023 · 0 comments
Open

Unable to add rel="preconnect" #163

17agustin opened this issue May 18, 2023 · 0 comments

Comments

@17agustin
Copy link

I was looking at how the script tag is loaded in the page and I found out that there was no rel attribute. I checked at the options of the package and I found this default list:

const defaults = {
  enabled: undefined,
  debug: false,

  id: undefined,
  layer: 'dataLayer',
  variables: {},

  pageTracking: false,
  pageViewEventName: 'nuxtRoute',

  autoInit: true,
  respectDoNotTrack: true,

  scriptId: 'gtm-script',
  scriptDefer: false,
  scriptURL: 'https://www.googletagmanager.com/gtm.js',
  crossOrigin: false,

  noscript: true,
  noscriptId: 'gtm-noscript',
  noscriptURL: 'https://www.googletagmanager.com/ns.html'
}

So basically there's no easy way to add a rel="preconnect" to the script tag. It would be good to have that in the options either as default or not. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant