Persist Filters Across Dashboards

Last updated: November 27, 2024

Users can set filters on one dashboard and have those same filters applied as they move across your app and onto different dashboards.

Implementation

  1. Set up a listener for sendVariableUpdatedEvent which will return varName and newValue.

  2. When the varName equals the corresponding filter, save that value.

    As an example if you're looking to persist this date filter, the varName in this case will be category_selection and after the user selects the category, the newValue will be "Art"

    Screenshot 2024-11-27 at 9.19.56 AM.png

  3. When the user navigates to the next dashboard, pass in this value into the embed code for the corresponding filter on this dashboard.

    If embedding via web component it will use this syntax:

    <explo-dashboard
      variables={JSON.stringify({
        var1: 'value',
      })}>
    </explo-dashboard>

    For iFrame embeds:

    src='https://app.explo.co/iframe/[JWT]/?var_1="value"'