Skip to content

Sends weekly Fathom Analytics reports to a Discord channel.

Notifications You must be signed in to change notification settings

xyflow/fathom-discord-roundup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fathom Analytics Reporting for Discord

This project sends weekly Fathom Analytics reports to a Discord channel.

Project Overview

  • Data Retrieval: The script uses Fathom Analytics Aggregations API to obtain weekly analytics data.
  • Report Generation: It calculates the number of pageviews for the previous week, compares them to the week before, and highlights the top pages.
  • Notification: The final report is sent to a Discord channel using a webhook.
  • Automation: A GitHub Actions workflow (configured via a YAML file) can run the script on a schedule (every Tuesday at 9 AM UTC) or be triggered manually.

Installation

  1. Clone the repository:
    gh repo clone xyflow/fathom-discord-roundup
  2. Navigate to the project directory:
    cd fathom-discord-roundup
  3. Install dependencies:
    pnpm install
    Or, if using npm:
    npm install

Configuration

Create a .env file in the project root directory and add your credentials:

DISCORD_WEBHOOK_URL=your_discord_webhook
FATHOM_API_TOKEN=your_fathom_api_token
FATHOM_SITE_ID=your_fathom_site_id

Creating a Discord Webhook

  1. Open Discord and navigate to the channel where you want to post the report.
  2. Click the settings icon (gear) next to the channel name.
  3. Select Integrations, then click on Webhooks.
  4. Click New Webhook and give it a name (e.g., "Fathom Report Bot").
  5. Copy the Webhook URL and paste it into your .env file as the DISCORD_WEBHOOK_URL.
  6. Save the changes.

Usage

Run the script manually by executing:

node index.js

About

Sends weekly Fathom Analytics reports to a Discord channel.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published