dankcharts.fm

Setup Guide

Three ways to get your listening history in. Pick the one you started with and follow it end to end.

Back to charts
  1. Copy the template sheet

    Open the template and click Make a copy. It lands in your own Drive — private to you.

    Open the template →

  2. Get your free Last.fm API key

    The sheet pulls your plays through Last.fm's API, and that needs a key of your own. Free, instant, no approval — sign in to Last.fm and fill in the form at last.fm/api/account/create. The values can be anything:

    FieldWhat to enter
    Application nameMy Music Charts
    DescriptionPersonal use
    Homepage (optional)https://dankcharts.fm
    Callback URL (optional)https://dankcharts.fm

    Copy the API Key it shows you — that's all this path needs. It also shows a Shared Secret; ignore that here, it's only for scrobble pushing.

  3. Fill in your details

    In your copy, open the Settings tab at the bottom and fill in column B.

    Column AColumn B — fill these in
    Last.fm Username: your_lastfm_username
    Last.fm API Key: your_32_character_api_key
    Data Tab Name: leave as-is

    The API key is the one you copied in Step 2 — paste it exactly, no extra spaces.

  4. The script is already there

    It came with the template — nothing to add. To see it:

    Extensions Apps Script

    Close that tab and carry on.

    Replace the script manually

    Paste this into Extensions → Apps Script, replacing everything there. Save with Ctrl+S, then redeploy if you set up a Web App in Step 7.

    
                      
                    
  5. Start auto-sync

    Everything is in place — this switches it on. Go back to the browser tab with your sheet: there's now a Last.fm menu in the menu bar at the top, just right of Help.

    Switch it on

    Last.fm Start Auto-Update (90 min)

    Approve it — one time only

    The first time you run anything from that menu, Google asks you to approve the script. It walks you through four screens, and one of them looks scarier than it is:

    Screen you'll seeWhat to click
    Authorization required Continue / Review permissions
    Choose an account your own Google account
    Google hasn't verified this app Advanced, then "Go to … (unsafe)"
    … wants access to your Google Account Allow

    What happens after that

    Nothing lands instantly — the first batch of plays arrives about a minute later, then a fresh one every 90 minutes. Each sync resumes from the last play it saved, so nothing is fetched twice.

    It runs on Google's servers, so you can close the sheet and the browser entirely. Want the newest plays right now instead of waiting? Last.fm → Fetch Latest Tracks runs the same sync on the spot.

    Why 90 minutes?

    Some services — Deezer especially — lag before their scrobbles reach Last.fm. A wider window means nothing gets missed.

  6. Connect it to dankcharts.fm

    Your sheet is filling up with plays — now point the site at it. This is the last step you actually need.

    First, let the site read the sheet

    dankcharts.fm reads your sheet straight from your browser and never signs in to your Google account, so a private sheet gives it nothing back. Open the Share button at the top right of your sheet and change one setting:

    In the Share dialogSet it to
    General access Anyone with the link
    The role beside it Viewer

    Copy the link from that same dialog

    While you're still in the Share dialog, use its Copy link button — not the URL in your browser's address bar.

    Paste it into the site

    Settings ⚙ Google Sheets
    FieldWhat to put in it
    Sheet URL or ID the link you just copied
    Tab name leave empty

    Leave Tab name empty unless you renamed the data tab in your copy — empty means Full Raw Listening History, which is what the template calls it.

    Hit Save & Load. Your plays are read on the spot and your charts appear. That's the setup done — Step 7 is optional, and only worth it if you want to change your listening history from the site rather than in the sheet.

  7. Let the site write back to your sheet Optional

    Everything so far is one-way: the site reads your sheet. Skip this step and your charts work perfectly — you just can't change anything from the site. Spend five more minutes here and three things switch on:

    • + Add Play — log a play that never scrobbled (a record, a live set, a friend's aux cord)
    • Fixing a play sticks — the button in Raw Data writes the correction into the sheet itself, instead of only tidying what you see in this browser
    • Autocorrect rules save — "this misspelling always means that artist" gets remembered and applied to the sheet on every load

    Deploy the script as a Web App

    The script that's been syncing your plays can also listen for messages from the site — but only once it's published with a URL of its own.

    Extensions Apps Script Deploy New deployment
    SettingValue
    Type (the gear icon)Web app
    Descriptionanything, or nothing
    Execute asMe
    Who has accessAnyone

    Press Deploy. Google asks you to authorise it, exactly as in Step 5 — same Advanced → Go to … (unsafe) → Allow path.

    Copy the URL it gives you

    The deployment finishes on a Web app URL — a long one ending in /exec, like https://script.google.com/macros/s/AKfy…/exec. Copy it, then paste it into the site. It lives one fold down from where you put your sheet link:

    Settings ⚙ Google Sheets Enable auto-sync & manual play entry Apps Script Web App URL

    Hit Save & Load. Open the Raw Data tab and you'll find + Add Play waiting at the top.

The Last.fm menu doesn't appear in my sheet.

Close and reopen the sheet. The onOpen function runs when the sheet loads — if you had the sheet open right after making your copy, just refresh the page.

No data is being imported.

Check that your Last.fm username (B1) and API key (B2) in the Settings tab are correct and have no extra spaces. You can test by clicking Last.fm → Fetch Latest Tracks and then going to View → Logs in the Apps Script editor.

The site shows "No Google Sheet configured".

Make sure you've pasted the sheet URL in dankcharts.fm Settings and that the sheet is shared as "Anyone with the link can view".

My charts are empty, but the sheet is full of plays.

Look at the URL you pasted into Settings. If it ends in #gid= followed by a number, it's pointing at one specific tab — whichever one was open when you copied it from the address bar. When that's the Settings tab, the site reads three rows of configuration instead of your listening history and shows empty charts without complaining.

Fix it by deleting everything from #gid= onwards, or by re-copying the link with the Copy link button inside the sheet's Share dialog, which never includes one.

Manual entry gives an error.

The Web App URL must be redeployed after any script change. In Apps Script: Deploy → Manage deployments → edit the existing deployment → Deploy.

Need help?

Can't get it working? Open a support ticket and we'll get back to you.

or email support@dankcharts.fm