Learn how to compare and analyze metrics in Oppla
// Browser implementation window.oppla.analytics.compare({ metric: 'page_views', timeRange: { current: { start: '2024-03-01', end: '2024-03-31' }, previous: { start: '2024-02-01', end: '2024-02-29' } } }); // Node.js implementation oppla.analytics.compare({ metric: 'page_views', timeRange: { current: { start: '2024-03-01', end: '2024-03-31' }, previous: { start: '2024-02-01', end: '2024-02-29' } } });
// Browser implementation window.oppla.analytics.compare({ metric: 'conversion_rate', segments: { current: ['premium-users'], previous: ['free-users'] } }); // Node.js implementation oppla.analytics.compare({ metric: 'conversion_rate', segments: { current: ['premium-users'], previous: ['free-users'] } });
// Browser implementation window.oppla.analytics.compare({ metrics: ['page_views', 'bounce_rate', 'avg_session_duration'], timeRange: { current: { start: '2024-03-01', end: '2024-03-31' }, previous: { start: '2024-02-01', end: '2024-02-29' } } }); // Node.js implementation oppla.analytics.compare({ metrics: ['page_views', 'bounce_rate', 'avg_session_duration'], timeRange: { current: { start: '2024-03-01', end: '2024-03-31' }, previous: { start: '2024-02-01', end: '2024-02-29' } } });
// Browser implementation window.oppla.analytics.compare({ metric: 'revenue', dimensions: { current: { device: 'mobile', country: 'US' }, previous: { device: 'desktop', country: 'US' } } }); // Node.js implementation oppla.analytics.compare({ metric: 'revenue', dimensions: { current: { device: 'mobile', country: 'US' }, previous: { device: 'desktop', country: 'US' } } });
// Browser implementation window.oppla.analytics.visualize({ type: 'line', metric: 'page_views', timeRange: { current: { start: '2024-03-01', end: '2024-03-31' }, previous: { start: '2024-02-01', end: '2024-02-29' } } }); // Node.js implementation oppla.analytics.visualize({ type: 'line', metric: 'page_views', timeRange: { current: { start: '2024-03-01', end: '2024-03-31' }, previous: { start: '2024-02-01', end: '2024-02-29' } } });
// Browser implementation window.oppla.analytics.visualize({ type: 'bar', metrics: ['page_views', 'bounce_rate'], segments: { current: ['premium-users'], previous: ['free-users'] }, options: { stacked: true, showPercentage: true } }); // Node.js implementation oppla.analytics.visualize({ type: 'bar', metrics: ['page_views', 'bounce_rate'], segments: { current: ['premium-users'], previous: ['free-users'] }, options: { stacked: true, showPercentage: true } });
Was this page helpful?