Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"next": ">=9.0.0",
"react": ">=16.8.0"
},
"dependencies": {},
"dependencies": {
"next": "^15.3.4"
},
"devDependencies": {
"@types/node": "^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0",
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/VWOScript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

import React from 'react';
import Script from 'next/script';

interface VWOScriptProps {
accountId: string;
Expand Down Expand Up @@ -67,7 +68,7 @@ export const VWOScript: React.FC<VWOScriptProps> = ({
href="https://dev.visualwebsiteoptimizer.com"
{...linkAttributes}
/>
<script
<Script
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,
I would suggest to use

<Script
  strategy="beforeInteractive"
...
/>

so that the script loads before hydration and there is no flicker.

{...scriptAttributes}
type="text/javascript"
id="vwoCode"
Expand Down