Skip to main content
Version: v1

Set Page properties

Set page properties

Use the FS.setVars API with the page scope to capture information about the current page. Page properties are available to search from the time of the FS.setVars call until the end of the page, which is considered to be any change to the URL host or path. To continue capturing page properties after a host or path change, the FS.setVars API must be called again.

You can call FS.setVars('page') multiple times on the same page, with and without the optional pageName field. When doing so, the set of provided pageProperties will be merged with any prior pageProperties you sent.

Parameters
    scope string required

    Specify page to scope this call to page-level properties.

    pageProperties object required

    A JSON object containing additional information about the page that will be indexed by FullStory.

Special Fields
These are reserved field names that can be included in pageProperties that have special meaning and usage.
    pageName string optional

    The value provided in this field will automatically become a Page, which can be used in a variety of places within FullStory, such as Journeys.
    Note: This value will take precedence over any URL-based page definitions you may have previously created. If this is not desired, please use another field to designate the page name.

Limits

  • Capture up to 20 unique properties (exclusive of pageName) on a single page.

  • Capture up to 500 unique properties across all pages.

  • The pageName field is limited to 1,000 unique values. Any new pageName values sent past this limit will be ignored.

  • If two different pageName values are sent while on the same page, the later API call will be ignored. Since this field is optional, a blank or missing pageName is not considered a change and will not affect the API call.

Additional Information

FS.setVars('page', pageProperties)

Example Invocation

Capturing cart size on the Checkout page
    FS.setVars('page', {
'pageName': 'Checkout',
'cart_size_int': 3,
});
Adding a coupon code to the previous properties
    FS.setVars('page', {
'coupon_code_str': 'spring2022',
});