next.js
next.js copied to clipboard
Update 12-third-party-libraries.mdx
What?
This PR aims to provide some clarification on what the dataLayer
prop does.
Why?
https://nextjs.org/docs/app/building-your-application/optimizing/third-party-libraries#options
Data layer array to instantiate the container with. Defaults to an empty array.
There seems to be 2 problems with this description when viewing the code https://github.com/vercel/next.js/blob/canary/packages/third-parties/src/google/gtm.tsx#L40-L45:
- There is no default.
- The dataLayer prop should be an object that is then pushed to the
dataLayer
array.