Notice: Due to size constraints and loading performance considerations, scripts referenced in blog posts are not attached directly. To request access, please complete the following form: Script Request Form Note: A Google account is required to access the form.
Disclaimer: I do not accept responsibility for any issues arising from scripts being run without adequate understanding. It is the user's responsibility to review and assess any code before execution. More information

Building Better : Yammer Group Analytics

I've been frustrated with the native Viva Engage (formerly Yammer) analytics for some time. The built-in reports give you basic numbers, but they don't help you understand what's actually happening with your communities. So I decided to build something better for group activity analysis.

The Problem with Native Yammer Reports

When you download group usage statistics from the Office 365 Admin Center, you get either 7-day or 30-day reports. But here's the catch - both are just aggregated totals for the entire timeframe. You don't get day-by-day breakdowns, which makes it impossible to spot trends or understand growth patterns.

Prerequisites for this solution:

  • Access to Office 365 Admin Center to download Yammer group usage reports
  • Two comparable reports (either 2x 7-day reports from different weeks, or 2x 30-day reports from different months)
  • A web browser (no server setup required)

Unfortunately, both the seven day and 30 day report are aggregated into figures for the whole time frame that do not break it down day by day.

This shows the uploading of the two "CSV" files:


Then when you use the "Analyze Trends" button you get the analytics report:

Group Activity Trend Analysis

I created a group analytics dashboard that works entirely in the browser. No backend, no database - just HTML, CSS, and JavaScript that processes your CSV files locally and compares two time periods to show meaningful trends.

The Data Structure Challenge

Here's what a typical group record looks like from the Office 365 export:

Report Refresh Date,Group Display Name,Is Deleted,Owner Principal Name,Last Activity Date,Group Type,Office 365 Connected,Member Count,Posted Count,Read Count,Liked Count,Report Period
2025-07-14,Cyber Alerts,False,cyber@bear.local,2025-07-14,private,Yes,912,5,3445,9,30

The key insight is that these are aggregated totals for the entire 30-day period. "Posted Count" means total posts in 30 days, not daily activity. This makes trend analysis impossible with a single report.

UHow the Comparison Works

The solution is comparing two reports from different time periods. Here's the core logic:

function compareReports(previousData, currentData) {
    // Create maps for easier comparison
    const previousMap = new Map();
    const currentMap = new Map();

    // Process previous data
    previousData.forEach(row => {
        const groupName = row['Group Display Name'];
        if (groupName) {
            previousMap.set(groupName, {
                memberCount: parseInt(row['Member Count']) || 0,
                postedCount: parseFloat(row['Posted Count']) || 0,
                readCount: parseFloat(row['Read Count']) || 0,
                likedCount: parseFloat(row['Liked Count']) || 0
            });
        }
    });

    // Process current data similarly
    // Then compare the differences...
}

This approach transforms static numbers into actionable insights. Instead of seeing "Group A has 50 posts," you see "Group A increased from 35 to 50 posts (+15)" - much more meaningful.

File Processing Implementation

The dashboard uses drag-and-drop file upload with client-side CSV parsing:

function parseCSV(csvText) {
    const lines = csvText.trim().split('\n');
    const headers = lines[0].split(',').map(h => h.trim().replace(/"/g, ''));
    const data = [];

    for (let i = 1; i < lines.length; i++) {
        const values = lines[i].split(',').map(v => v.trim().replace(/"/g, ''));
        if (values.length === headers.length) {
            const row = {};
            headers.forEach((header, index) => {
                row[header] = values[index];
            });
            data.push(row);
        }
    }
    return data;
}

Simple, effective, and it runs entirely in your browser. No data leaves your machine.

Simple Website with CSS with Javascript

The entire solution is a single HTML file with embedded CSS and JavaScript:

// Dual file upload system
setupFileUpload('previousInput', 'previousUpload', 'previous');
setupFileUpload('currentInput', 'currentUpload', 'current');

// Analysis triggered when both files uploaded
function performAnalysis() {
    const analysis = compareReports(previousData, currentData);
    displayAnalysis(analysis);
}

How can Users produce reports?

  1. Download two Yammer group reports from Office 365 Admin Center
  2. Upload the "previous month" report
  3. Upload the "current month" report
  4. Click "Analyze Trends" to see results
Previous Post Next Post

نموذج الاتصال