fullstorydev / fullstory-browser-sdk

Official FullStory SDK for JavaScript, for web browsers
MIT License
55 stars 17 forks source link

getCurrentSessionURL with relay returns broken link #119

Closed eni9889 closed 1 year ago

eni9889 commented 2 years ago

When using fullstory with full story relay the getCurrentSessionURL() returns app.relay.domain instead of app.fullstory.com

patrick-fs commented 2 years ago

Hi @eni9889 are you passing any config options into the init() function? If so, can you please share them here?

eni9889 commented 2 years ago

Hi @eni9889 are you passing any config options into the init() function? If so, can you please share them here?

Sure this is the init function:

FullStory.init({ orgId: environment.fullStoryOrg, recordCrossDomainIFrames: true, devMode: !environment.production, host: 'fsrelay.one.store', script: 'fsrelay.one.store/s/fs.js', })

patrick-fs commented 2 years ago

Hi @eni9889 thanks for the additional information.

There is a global parameter you can set on the window object that should explicitly set which domain is used by getCurrentSessionURL()

You can set it like this:

window.fs_app_host = 'app.fullstory.com';

We haven't yet incorporated this into the SDK init options, but this should global var should fix things for you. Please let me know if this doesn't work for you.