Comments (1)
You must do something like this
import Script from 'next/script'
const GTM_ID = 'GTM-XXXXXXX';
...
<html>
<Script id="google-tag-manager" strategy="afterInteractive">
{`
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','${GTM_ID}');
`}
</Script>
<body>
...
</body>
</html>
app/layout.tsx file
Documentation : https://nextjs.org/docs/pages/building-your-application/optimizing/scripts
from twitterbio.
Related Issues (20)
- error - Provided runtime "edge" is not supported. Please leave it empty or choose one of: experimental-edge, nodejs HOT 2
- It works on my local, but api 500 after I uploaded to vercel HOT 3
- [bug] turbo not working in stream HOT 4
- Seems like we didn't handle error chunk here? HOT 3
- API resolved without sending a response for /api/streamgen, this may result in stalled requests.
- License? HOT 3
- How to stream response using Next.js Serverless functions instead? HOT 3
- How to add more components to the app
- Word Limit HOT 1
- Is there a way to add markdown to responses?
- Sending an additional param to const payload: OpenAIStreamPayload
- How to debug OpenAIStream? HOT 1
- TypeError: res.body is not async iterable HOT 1
- How to allow CORS
- Nothing rendering to the screen HOT 1
- Doesn't validate input
- Generating twitter bio of previously given pasted bio not current bio. HOT 6
- Use useChat hook with multiple input fields?
- Identical Images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitterbio.