Other Configurations
At this moment, our embedded analytics support an option to enable/disable the ability to export data in embedded dashboard.
If you don't want your users to download data, just simply set "enable_export_data": false
.
settings = {
"enable_export_data": false
}
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 = {
"enable_export_data": false/true
}
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