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. 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
    No API key yet?

    Get one free in about two minutes at last.fm/api/account/create. The application name can be anything.

  3. 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 6.

    
                      
                    
  4. Start auto-sync

    Back in your sheet, a Last.fm menu now sits next to Help.

    Last.fm Start Auto-Update (90 min)

    New plays arrive every 90 minutes from now on. Want them immediately? Last.fm → Fetch Latest Tracks.

    Why 90 minutes?

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

  5. Connect it to dankcharts.fm

    Settings ⚙ Google Sheets paste your sheet URL
  6. Add plays by hand Optional

    Only needed for the + Add Play button. Deploy the script as a Web App:

    Extensions Apps Script Deploy New deployment
    SettingValue
    TypeWeb app
    Execute asMe
    Who has accessAnyone

    Hit Deploy, authorise it the same way as in Step 4, and copy the Web App URL. Then paste it into:

    Settings ⚙ Enable auto-sync & manual play entry
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".

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