Skip to content

What's the best way to add third-party scripts (GTM)? #126

Answered by ElMassimo
emmanuelsw asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Emmanuel!

That's one way to do it, I don't see any disadvantages for an îles site.

The "supported way" is to use Head scripts, as in this example:

# src/app.ts
import { defineApp } from 'iles'

export default defineApp({
  head: {
    script: [
      { src: '<third party script url>', async: true, once: true },
    ],
  },
})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ElMassimo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants