Three ways to get your listening history in. Pick the one you started with and follow it end to end.
Open the template and click Make a copy. It lands in your own Drive — private to you.
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:
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.
In your copy, open the Settings tab at the bottom and fill in column B.
The API key is the one you copied in Step 2 — paste it exactly, no extra spaces.
It came with the template — nothing to add. To see it:
Close that tab and carry on.
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.
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
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:
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.
Some services — Deezer especially — lag before their scrobbles reach Last.fm. A wider window means nothing gets missed.
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:
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
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.
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:
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.
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:
Hit Save & Load. Open the Raw Data tab and you'll find + Add Play waiting at the top.
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.
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.
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".
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.
The Web App URL must be redeployed after any script change. In Apps Script: Deploy → Manage deployments → edit the existing deployment → Deploy.
Can't get it working? Open a support ticket and we'll get back to you.
or email support@dankcharts.fm