General Settings (Embedded Analytics)
General Settings (Embedded Analytics)
To set up general settings for your Embedded Analytics, refer to the following:
Export Data in Embedded Dashboard
Our embedded analytics now allow option for controlling data export within dashboards.
To restrict user access to data downloads, set enable_export_data to false.
settings = {
enable_export_data: false,
};
Hide your Filter (Control)/Header Panel
Customize your embedded dashboards by hiding the filter (control) or header panel:
settings = {
...
"hide_header_panel": true/false,
"hide_control_panel": true/false,
...
}
Full Code
Please refer to the full code example below to see where to add that configuration
# Example code below uses JWT for encoding
# Execute 'gem install jwt' (or add gem 'jwt' to your GemFile) to install it first
embed_code = 'your_embed_code'
secret_key = 'your_secret_key'
# Will expire after 1 day, change it to the value you want.
expired_time = Time.now.to_i + 24 * 60 * 60
settings = {
# To restrict user access to data downloads
"enable_export_data": false/true
# To hide header/control panel
"hide_header_panel": true/false,
"hide_control_panel": true/false,
}
permissions = {
"row_based": [
# permission rules go here
]
}
filters = {
# filter display settings go here
}
drillthroughs = {
# drill through settings go here
}
# Add all above settings to the payload
payload = {
settings: settings,
permissions: permissions,
filters: filters,
drillthroughs: drillthroughs,
exp: expired_time,
}
# Generate Embed Token
token = JWT.encode(payload, secret_key, 'HS256')
After done setting up Filter Display, you can continue with other setups to embed the dashboard into your application. For more information, please refer to this doc