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

fs.js is loaded twice #198

Open
dsacramone opened this issue Oct 14, 2024 · 0 comments
Open

fs.js is loaded twice #198

dsacramone opened this issue Oct 14, 2024 · 0 comments

Comments

@dsacramone
Copy link

dsacramone commented Oct 14, 2024

I am using v2 of the snippet in my NextJS (latest version) app. I don't want to load it instantly so I am importing it as I need it. But, I notice two fs.js files are loaded. The initial iniator is my code init()... BUT, the second initiator is the first "fs.js". It's calling itself to load. Also

Here is my code calling the v2 version:
// Dynamically import FullStory
import('@fullstory/browser')
.then(({ init, FullStory }) => {
init({ orgId: '*********' });
})
.catch((err) => {
console.error('Error loading FullStory:', err);
});

That loads the first "fs.js" - BUT a few moments later, another "fs.js" script appears in the console from this code, from the first fs.js file:

var u = n.createElement("script");
                u.async = !0,
                u.crossOrigin = "anonymous",
                u.src = "".concat(i, "//").concat(r),
                "testdrive" == e && (u.src += "?allowMoo=true"),
                n.head.appendChild(u)
Screenshot 2024-10-14 at 2 20 04 PM
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