Switch automation traffic to internal

  • 7 February 2024
  • 1 reply


I'm still getting familiar with FullStory, and I'm currently automating using webdriverio for a mobile app that has FullStory in it. From a testing standpoint, I'd like to redirect traffic for automation to our internal organization. I found a snippet from the Settings for switching organizations, but I'm struggling to implement it successfully.  I've tried adding the snippet in the BeforeSession hook of my wdio.conf.ts file, like this:  

export async function FSSwitch(orgId: string, apiKey: string) {
const snippet = `
window['_fs_host'] = '';
window['_fs_script'] = '';
window['_fs_org'] = '${orgId}';
window['_fs_namespace'] = 'FS';
window['_fs_api'] = '${apiKey}';
!function(m,n,e,t,l,o,g,y){var s,f,a=function(h){
return!(h in m).....)}(window,document,window._fs_namespace,"script",window._fs_script);
try {
} catch (error) {
console.log(" Scripterror:", await error);

Unfortunately, it doesn't seem to switch. Could you please guide me on how to achieve this using the correct approach? Thanks!

1 reply


Hey @Visakh  ! Thanks so much for reaching out and welcome to the Community! 😁

This type of question would be best answered by our amazing support team directly, so I’ve gone ahead and created a ticket on your behalf. They’ll be reaching out to you soon and will likely ask you to share more information to help troubleshoot. 

Please don’t hesitate to reach out should you have any other questions!