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

Asset Uploading with setVars #184

Open
wkrause13 opened this issue Oct 6, 2023 · 1 comment
Open

Asset Uploading with setVars #184

wkrause13 opened this issue Oct 6, 2023 · 1 comment

Comments

@wkrause13
Copy link

The documentation for uploading assets says to use setVars as follows:

FS.setVars('document', { assetMapId: 'ASSET_MAP_ID' });

However, this results in the following typescript error:

Argument of type '"document"' is not assignable to parameter of type '"page"'.ts

Is the documentation correct and should setVars support more values other than "page", or does the documentation need updating?

This was observed in version 1.7.1 of the browser sdk.

@1etoy
Copy link

1etoy commented Oct 27, 2023

Hi there @wkrause13! Thanks for getting a ticket in with FullStory Support about this and sorry we hadn't seen this issue posted here. (We've added something on our end to notify us if new issues are added so we won't miss any new issues in the future. 🙂)

Just following up with the answer we shared in that ticket, in case other folks find this issue and are curious about the answer.

In version 1.7.1 it was the case that the FS.setVars call only accepted a string value of page for the scope (see 'Note' at the bottom of the page here).

However, we released 2.0.0 version of the browser SDK which added support for asset uploading, so we would recommend you update to version 2.0.0 and add the configuration in your FS initialization as the assetMapId (see here).

Alternatively, if you're not looking to update to version 2.0.0, you should be able to set the global variable before you initialize FullStory as shown here:

window['_fs_asset_map_id'] = 'ASSET_MAP_ID';
FullStory.init(...);

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

2 participants