-
Notifications
You must be signed in to change notification settings - Fork 17
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_script is not defined #74
Comments
Hi @sanathfp, thanks for reaching out. Admittedly, I haven't tested a server-side rendered scenario for the browser-sdk. Is your app on a test server that I could investigate? As a stop gap, you could simply add the FullStory snippet to the |
Hey @van-fs |
@sanathfp Ah, so you're using the browser-sdk to selectively load FullStory, correct? If so, I think we can solve that outside of code actually. You can update FullStory admin settings to block recording for specific domains (e.g. localhost:4200 or dev.yourapp.com). See Can I disable recording for a specific domain? Let me know if that's a more appropriate solution to limiting recording for your app |
This sounds like a good solution! I'm guessing it will work as it doesn't depend on the library. Thanks for this. Thank you! |
Following @patrick-fs's comment, this is the snippet that worked for my Nuxt.js SSR app in case anyone came here looking for that (adding the fullstory SDK as a plugin and using Nuxt Lifecycle hooks to ensure that the script is added only on the client side): import * as FullStory from '@fullstory/browser'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.hook('app:beforeMount', () => {
FullStory.init({ orgId: useRuntimeConfig().FULLSTORY_ORG_ID })
nuxtApp.vueApp.config.globalProperties.$FullStory = FullStory
})
}) |
I'm using an angular app and I'm trying to render the app on the server.
Here is my app.component.ts
constructor() {
FullStory.init({ orgId: '<code>',
devMode: !environment.fullstoryProduction });
}
When I try to run my application, I get an error that says
_fs_script is not defined
. I tried manually setting the window element by usingwindow['_fs_script'] = 'edge.fullstory.com/s/fs.js';
. Still no luck.The text was updated successfully, but these errors were encountered: