I get a lot of messages that start the same way: someone wants a button on a site that isn't there, or a list of items pulled off a page into a spreadsheet, and they've been told Tampermonkey can do it. It can. A Tampermonkey userscript is the cheapest way to bolt custom behaviour onto a site you don't own, and you don't need a huge software stack to start. Installing the extension takes seconds. Getting your first script to actually fire takes a few minutes, almost entirely because of one permission that trips up nearly everyone.
Here is the whole process, in the order I'd walk a client through it on a call.
What a userscript actually is
A userscript is a small piece of JavaScript that your browser injects into a specific site every time you visit it. JavaScript is the language that already runs inside every page you load — a userscript just adds your own code to whatever the site is already running.
Tampermonkey is the manager that holds those scripts, decides which sites each one applies to, and injects them at the right moment. Without a manager, you'd have to open the developer console and paste your code in by hand on every single visit.
That distinction matters for what comes later. Tampermonkey runs your code inside a browser tab that you have open. It is not a server, it is not scheduled, and it stops the moment you close the tab. For a lot of small jobs that's exactly right.
How to install Tampermonkey in your browser
Open the Chrome Web Store, search for Tampermonkey, and click Add to Chrome. That part takes seconds and there's nothing to configure.
The same extension exists for Edge, Firefox, Opera and Brave. The steps below are near-identical across all of them; only the wording of the settings screen shifts a little. If you're on Safari, the userscript ecosystem there is different enough that I'd point you at a Safari-specific manager instead.
Once it's installed, pin the extension so its icon sits in your toolbar. You'll be clicking it constantly and hunting through the puzzle-piece menu every time gets old fast.
Turn on the permission most beginners miss
This is the step people skip, and it's why so many first scripts do nothing at all.
Recent versions of Chrome and Edge require you to explicitly allow extensions to run user scripts. Go to chrome://extensions, turn on Developer mode with the toggle in the top right, then open Tampermonkey's Details and confirm the Allow user scripts toggle is on. Chrome's own reference for the userScripts API and its developer-mode requirement explains why this gate exists: injecting arbitrary code is powerful, so the browser makes you opt in on purpose.
One correction to advice you'll see repeated elsewhere, including in an earlier version of this article. Allow access to file URLs is a separate setting. It only matters if you want your scripts to run on local file:/// pages on your own machine. It is not the toggle that makes scripts work on normal websites. Turning it on and expecting your script to fire on a shopping site will leave you stuck.
Create and save your first script
Click the Tampermonkey icon in your toolbar and choose Create a new script. A built-in editor opens with a template already filled in. Replace the body with something small enough that you can tell instantly whether it ran:
// ==UserScript==
// @name Link counter
// @match https://example.com/*
// @grant none
// ==/UserScript==
const links = document.querySelectorAll('a');
console.log('Links on this page:', links.length);
Then click File, then Save. Tampermonkey saves inside its own storage, not to a file on your desktop, so there's nothing to move anywhere.
That document.querySelectorAll call is the workhorse of nearly every scraping script I write. It hands you every element matching a CSS selector. If you only ever learn one browser API, learn that one — MDN's reference for querySelectorAll is the version I still check.
The metadata block decides whether your script runs
The commented block at the top isn't decoration. Tampermonkey reads it before it reads anything else.
@name is the label you'll see in the dashboard. @match is the one that decides everything: it's the URL pattern that tells Tampermonkey which pages this script belongs to. Set it to https://example.com/* and the script fires on every page of that domain and nowhere else. Get the pattern wrong and your code is perfect and silent.
@grant none means the script isn't asking for any of Tampermonkey's special powers and can run in the fastest mode. You'll need to change that later if you start storing values between visits or making cross-domain requests. The official Tampermonkey documentation for metadata directives lists every option, and it's worth skimming once so you know what exists.
Navigate, refresh, and check it worked
Go to the site your @match pattern points at. If the tab was already open before you saved, hit refresh — Tampermonkey injects on page load, so an already-loaded tab won't pick up a script you just wrote.
The examples people ask me about most are e-commerce listings, where the goal is pulling product names and prices into a usable format, and sites with awkward custom layouts like Pinterest, where the aim is usually adding a control the site never gave you. Both work the same way: match the URL, grab the elements, do something with them.
Open the developer console with F12 to see your console.log output. A green badge on the Tampermonkey icon with a number on it means a script matched the current page.
When your userscript does not run
Nothing happened. This is normal and it's almost always one of five things.
Fixes in the order I try them
Check the @match pattern first — a missing /* at the end or http where the site uses https is the single most common cause. Then confirm the script is toggled on in the Tampermonkey dashboard. Then confirm the developer-mode and user-scripts settings from earlier survived your last browser update, because they sometimes don't. Then refresh, properly, with the tab reloaded rather than switched back to.
If it still does nothing, the site is probably loading its content after the page finishes loading. Modern sites build most of what you see with JavaScript, so your script runs against an empty shell and finds nothing. The quick test is to wait a couple of seconds before your code runs; the durable fix is a MutationObserver that waits for the elements to appear.
Still stuck? Read the console
Errors in your script show up in the developer console with a line number. Cannot read properties of null means the element you asked for wasn't on the page when you looked. That's a timing problem or a selector problem, and it's rarely anything more exotic.
Where Tampermonkey stops being the right tool
I'll say this plainly, because it saves people money. Tampermonkey is excellent for anything that happens while you're sitting at your browser with the tab open. It's the wrong tool the moment you need a job to run overnight, on a schedule, across thousands of pages, or without a human present.
At that point the work moves to Python and Playwright, which drives a browser without anyone watching it and can write straight into a database or a Google Sheet. Playwright's own getting-started documentation is a fair place to see what that shift involves. I've written more about picking between the two in the DatafetchPro guide to browser automation services.
One more thing before you paste anything: don't run a userscript you found on a forum without reading it first. It has the same access to your logged-in sessions that you do.
A note on the sites you target
Whether you're allowed to scrape a particular site is a question about that site's terms of service and its robots.txt file, and that call belongs to you, not to me. RFC 9309, the robots.txt specification, covers what the file is and how it's meant to be read. I'll build the technical approach and tell you honestly what's feasible; the decision about a given target stays on your side.
If you'd rather hand it over
If you followed all of this and your script still won't fire, or it fires and then breaks every time the site changes its layout, that's the point where hiring someone tends to be cheaper than another weekend of debugging.
I build userscripts, Chrome extensions, no-code browser macros, and full Python and Playwright pipelines to order, and I sell exclusively through Fiverr. You can tell me what you need built on the DatafetchPro hire page, see who is behind DatafetchPro, or browse the rest of the DatafetchPro automation and scraping articles.