Sewage will be tested for Covid-19 to rapidly identify outbreaks and implement circuit breaker lockdowns.
The £2.3million scheme aims to integrate mass human screening with data from waste water samples for towns and regions.
The Scottish Environment Protection Agency (Sepa) will collect sewage at 96 sites covering four million people.
Waste water will then be tested weekly with the option of increasing frequency when local outbreaks are detected in a bid to stamp out transmission.

Sepa was among the first European agencies to begin planning the groundbreaking work to pinpoint fragments of Covid’s ribonucleic acid (RNA) last May.
Minister for Public Health Mairi Gougeon MSP said: “Moving into this next phase of the pandemic required us to update Scotland’s testing approach.
“The refreshed strategy I published last week sets out the important role that testing will play as part of our everyday lives if we’re to protect this progress and prevent future outbreaks.
“This includes further funding of £2.3million to develop the waste water testing capability that informs our community testing programme as well as a £13million investment to establish a genomic sequencing service to track new variants of the virus.

“Our goal remains to suppress the virus to the lowest level possible. We’re thankfully seeing fewer deaths but people are still being admitted to hospital and much research is ongoing into the debilitating long-term effects the virus is having on many others.
“While testing cannot achieve this on its own, it is a vital tool that we can use to help prevent future outbreaks, alongside vaccination, and following rules on social distancing, contact and hygiene.
“Regardless of whether you have symptoms or not, the sooner you know you have Covid-19, the sooner you can take action by self-isolating and avoid spreading it to those around you. One of the most difficult things about this virus is how easily it can spread without symptoms.”
A contract to analyse sewage provided by Sepa has been advertised on the Scottish Government website.
Competitive tendering documents state: “The Scottish Government requires to procure integrative biostatistical support bringing together data from human Covid-19 testing and waste water testing. This is to support the local response to Covid-19 especially in the rollout of local mass-testing.
“The contract is designed to start as soon as possible and run until March 31, 2022.
“The work was proposed by the chief scientific advisor for environment, natural resources and agriculture and will be funded through Rural and Environmental Science and Analytical Services.”
Scientists established last year that the virus’s genetic material could be identified in waste water. Several countries, including the UK, have now implemented national monitoring programmes.

Total case numbers cannot be accurately predicted from waste water with current technology.
However, it is hoped that when integrated with clinical testing and contact tracing it can help act as an early warning system.
Scientists believe the waste water technique could also be applied to other diseases in the future.
Terry A’Hearn, Sepa chief executive, said: “The additional funding announced by Scottish Government will play a significant role in Scotland’s recovery from Covid-19.
“With the backing of Scottish Government and Public Health Scotland, alongside Scottish Water, we’re delivering a service that enables us to have a richer picture of the prevalence of the virus – which will be key in helping to inform Scotland’s route out of lockdown.”
The agency is delivering the monitoring programme alongside Scottish Water, the Centre of Expertise for Waters, the University of Edinburgh’s Roslin Institute, and Heriot Watt University.
Around 200 samples will be tested a week at a laboratory near the Eurocentral campus in North Lanarkshire.
The Scottish Government will also invest £13million in a service to track new variants of the virus as part of a testing strategy revamp.