View source: R/telemetry_ingest.R
| bid_suggest_analytics | R Documentation |
Provides recommendations for analytics and telemetry solutions suitable for static Quarto dashboards, where Shiny-based telemetry (shiny.telemetry or OpenTelemetry) is not available. This function helps you choose the right analytics tool based on your needs and constraints.
Important: shiny.telemetry and Shiny OpenTelemetry only work with
server: shiny in Quarto YAML. For static Quarto dashboards (including
OJS-based dashboards), you need alternative web analytics solutions.
bid_suggest_analytics(
dashboard_type = c("static", "ojs", "python"),
privacy_preference = c("gdpr_compliant", "privacy_focused", "standard"),
budget = c("flexible", "free", "low"),
self_hosted = FALSE
)
dashboard_type |
Character string specifying the type of dashboard:
|
privacy_preference |
Character string indicating privacy requirements:
|
budget |
Character string indicating budget constraints:
|
self_hosted |
Logical indicating whether self-hosted solutions are preferred (default: FALSE) |
A data frame with recommended analytics solutions, including:
solution |
Name of the analytics platform |
type |
Type of solution (privacy-focused, traditional, open-source) |
cost |
Cost tier (free, paid, freemium) |
self_hosted |
Whether self-hosting is available |
gdpr_compliant |
Whether the solution is GDPR compliant |
integration_method |
How to integrate (script tag, API, etc.) |
key_features |
Main features for UX analysis |
bidux_compatibility |
How well it works with BID framework |
docs_url |
Link to integration documentation |
For Static Quarto Dashboards:
Event Tracking - Track user interactions with custom events:
Button clicks, filter changes, tab switches
Use JavaScript event listeners in Quarto
Send events to analytics platform via API
Session Analysis - Monitor user sessions:
Page views, time on page, bounce rate
User flow through dashboard sections
Identify drop-off points
Custom Dimensions - Track dashboard-specific metrics:
Selected filters, date ranges, visualization types
User cohorts, roles, or departments
Dashboard version or configuration
Example Integration (Plausible Analytics):
Add to your Quarto dashboard header:
<script defer data-domain="yourdomain.com" src="https://plausible.io/js/script.tagged-events.js"></script>
Track custom events in your dashboard JavaScript:
// Track filter change
document.getElementById('regionFilter').addEventListener('change', function(e) {
plausible('Filter Changed', {props: {filter: 'region', value: e.target.value}});
});
// Track visualization interaction
plotElement.on('plotly_click', function(data) {
plausible('Chart Interaction', {props: {chart: 'sales_plot', action: 'click'}});
});
Analyzing Results with BID Framework:
While these analytics tools won't automatically integrate with bid_ingest_telemetry(),
you can still apply BID framework principles:
Notice - Export analytics data, identify friction points manually
Interpret - Use bid_interpret() with insights from analytics
Anticipate - Apply bid_anticipate() to plan improvements
Structure - Design improvements with bid_structure()
Validate - Measure impact with before/after analytics comparison
# Get recommendations for static Quarto dashboard with GDPR compliance
suggestions <- bid_suggest_analytics(
dashboard_type = "static",
privacy_preference = "gdpr_compliant"
)
print(suggestions)
# Find free, privacy-focused solutions for OJS dashboard
privacy_options <- bid_suggest_analytics(
dashboard_type = "ojs",
privacy_preference = "privacy_focused",
budget = "free"
)
# Get self-hosted options
self_hosted <- bid_suggest_analytics(
dashboard_type = "static",
self_hosted = TRUE
)
# View top recommendation
top_choice <- suggestions[1, ]
cat(sprintf("Recommended: %s\n", top_choice$solution))
cat(sprintf("Integration: %s\n", top_choice$integration_method))
cat(sprintf("Docs: %s\n", top_choice$docs_url))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.