The reality
Most scripts on a modern site arrive without an engineer writing or reviewing them.
Why it matters
Every one of them runs with full access to the page, including payment and login forms.
What works
Watch what actually runs in visitors' browsers, whoever added it, and decide per script.
Who adds scripts to a website?
Mostly people outside engineering: marketing through a tag manager, agencies, platform plugins, the vendors you already use, and now AI coding tools. More than nine in ten web pages load at least one third party, often added indirectly by another script, and close to half of all websites run Google Tag Manager, which lets non-engineers add scripts without a release. Developers now say 42% of their code is AI-generated or AI-assisted.
Six ways a script reaches your pages
- Marketing, through a tag manager. A new pixel or chat widget goes live with a click in Google Tag Manager, Adobe or Tealium, with no code review and no deploy.
- Agencies. A campaign, an A/B test or a landing page brings its own tags, and they often stay after the campaign ends.
- Platform plugins and themes. A Shopify app, a Magento extension or a WordPress plugin adds scripts to every page, checkout included, on its own update schedule.
- The vendors you already use. A script you approved loads other scripts. You approved one vendor; its tag decides who else runs.
- AI coding tools. Assistants and agents add libraries and snippets to make something work, faster than anyone reviews them. In Sonar's 2026 developer survey, developers said 42% of their code is now AI-generated or AI-assisted, and only 48% always check AI-assisted code before they commit it.
- Your own developers. Still the one route with a review, a commit and a release.
Only the last route goes through the process most security reviews assume. See tag manager security for how containers load scripts, and building a payment page script inventory for keeping a list that stays true.
Why it matters
A script in the browser can read the page and anything typed into it, change what visitors see, and send data anywhere. It does not matter who added it. A tag added for one campaign has the same access to the checkout as your payment form. And because these routes skip releases, the usual controls never see them: code review, change approval and dependency scanning only cover what goes through the repository.
Attackers use the same routes. Recorded Future counted thousands of e-commerce domains hit by web skimming in the first half of 2025 alone, with infection rates well above early 2024. Recent cases came through a trusted analytics tag (the Plerdy compromise) and a performance script (the DebugBear incident), not through anyone's code review.
What PCI DSS 6.4.3 & 11.6.1 expect
On payment pages, 6.4.3 asks for an inventory of every script with a reason it is there, and 11.6.1 asks you to notice unauthorised changes as the browser receives them. Neither cares who added the script. An inventory built from the repository misses every tag manager, agency and plugin script by design.
See every script that runs on your pages, whoever added it, and get alerted when a new one appears. Free on 1,000 page views a month.
What to do this week
- List what actually runs on your payment and login pages, from a real browser, not from the repository
- For each script, write down who added it, why, and who owns it now
- Remove tags that no longer have an owner or a reason, starting with checkout
- Ask your tag manager users to keep payment pages out of their containers' triggers
- Agree that new scripts on payment pages need a named owner and a reason before they go live
- Alert on any new script or changed script on those pages, whoever added it
How Script Monitoring keeps track
Script Monitoring records every script that runs in real visitors' browsers, with who loaded it and from where, so a tag added through a tag manager, a plugin or an agency shows up the first time it runs. New and changed scripts raise an alert, and you can allow, limit or block each vendor. On payment pages the same record is your evidence for PCI DSS 6.4.3 & 11.6.1. See script inventory and vendor management.
Sources and methodology
The share of pages with third parties is from the HTTP Archive Web Almanac 2024, Third Parties chapter. The share of websites using Google Tag Manager is from W3Techs' tag manager survey, January 2026; usage figures change month to month. The AI coding figures are from Sonar's 2026 State of Code developer survey (published 8 January 2026, over 1,100 developers, self-reported). The web skimming figures are from Recorded Future's H1 2025 malware and vulnerability trends report. Requirement descriptions are paraphrased from PCI DSS v4.0.1, published by the PCI Security Standards Council. Written on 10 November 2026.
Ask an AI
Don’t just take our word for it
Who adds scripts to a website besides developers, and how do you keep track of them on payment pages?
Frequently asked questions
Is a tag manager a security risk?
Not by itself. It is a fast way to add scripts without a release, so it needs the same watching as any other route. See tag manager security.
Can we just ban marketing from adding tags?
You can keep them off payment pages, which is the part that matters most. Banning tags everywhere rarely survives the next campaign.
Do AI coding tools add risky scripts?
They add whatever makes the task work, which can include libraries and snippets nobody reviewed. Treat their changes like any other unreviewed code.
Does PCI DSS 6.4.3 cover scripts added through a tag manager?
Yes. It covers every script that runs in the customer's browser on a payment page, however it got there.