It's a disgusting idea for most of us, but scientists say sampling our sewage on a mass scale - or "one large urine test", as they've called it - has endless potential.
Already, tests at city wastewater treatment plants have revealed fascinating insights into our use of illicit drugs.
But Kiwi scientists say there are countless other discoveries waiting to be made in the burgeoning field of "wastewater-based epidemiology" - among them monitoring contaminants, disease, and even obesity.
Information about a whole population's exposure to agents and disease can be revealed by picking up signature biomarkers among collective wastewater samples.
It's currently being targeted at use of drugs methamphetamine, cocaine, heroin, alpha PVP, MDMA and creatinine in a project between police and ESR at Christchurch and Auckland treatment plants.
The latest figures suggest there are around 388,000 illegal drug users in New Zealand.
But such data - based off crime statistics, medical records, drug production and seizure rates - are considered notoriously inaccurate for assessing what's a $1.8b problem.
Traditional analysis approaches were also time-consuming and limited in picking up changing patterns or differences between local communities.
When the joint-agency National Drug Intelligence Bureau commissioned ESR to build the country's first state-funded wastewater drug testing programme two years ago, it was a first.
But the bureau's boss, John O'Keeffe, said following Australia in turning to the method was well worth the investment, which itself was funded by seized proceeds of crime.
Customs NZ had also used the data to inform its work at the border.
"For us, up until now, reliable data about the volume of illegal drugs used by the population was difficult to obtain," O'Keeffe said.
"Wastewater testing provides an accurate measure of illegal drug consumption that is cost effective, timely and non-intrusive."
Flushing out our drug habits
ESR scientists spent a year sampling wastewater over seven consecutive days each month, meaning patterns could be pinpointed on week-to-week and annual scales.
It also gave agencies near real-time intelligence about what drugs - excepting cannabis - were flowing through cities.
They found meth was the main drug of choice in Auckland and Christchurch, with habitual use throughout the week, while cocaine and MDMA were more likely used recreationally as their traces spiked over weekends.
Auckland's sampling turned up a higher proportion of cocaine consumption than Christchurch, which could be explained by community demographics and the drug's high street price.
Traces of heroin and a-PVP were yet to be detected.
ESR chemist Andrew Chappell explained that whatever people consume was metabolised by the body into other compounds, before they were excreted and make their way into the wastewater system.
When drugs were consumed, a mixture of the parent compounds of the drug taken and associated metabolites were also excreted, and could be traced based on a method that was developed as recently as 2011.
"We don't just look for the drugs themselves but for the biomarkers - that is the unique metabolites that humans excrete from their system after using drugs."
Chappell and his colleagues were using what's called a solid phase extraction machine, able to extract and concentrate drugs and other compounds from the wastewater.
"The metabolites that are indicators of the drugs present in the wastewater are extremely diluted," he said.
"The SPE machine is able to concentrate the samples 400 times so we can detect very low levels of what is in the water."
The group weren't the only researchers using the approach.
A Massey University-led pilot study, carried out in 2014, revealed high levels of methamphetamine, codeine, morphine and methadone at two major Auckland wastewater facilities.
The results showed methamphetamine, codeine, morphine and methadone were detected with high frequency - showing up in between 80 to 100 per cent of days over the sampling period - followed by amphetamine, MDMA and methylone.
An overall mean of 360mg of methamphetamine and 60mg of MDMA, better known as ecstasy, was estimated to have been consumed per day per 1000 people.
While methamphetamine consumption was found at similar amounts in both catchments - at levels of 377 and 351mg per day, per 1000 people - cocaine was only detected in one catchment, and on only eight occasions.
Two of the detections identified cocaine but not its metabolite, suggesting the disposal of raw cocaine into the sewer rather than cocaine consumption.
In line with ESR's findings, meth, codeine and other opioids were detected at a consistent level throughout weekdays, while ecstasy and methylone, a common ecstasy substitute, were detected only during the weekends.
ESR's aim was specifically to determine the amount, type and distribution of illicit drug use in areas in real time, with a focus on methamphetamine, cocaine, MDMA, heroin and alpha-PVP.
'The opportunities are limitless'
Last year, ESR's study was extended to include Northland - and results since had revealed a high rate of meth in Whangarei's wastewater.
Chappell said drug use sampling was just one application; he recently attended a global conference where more than 50 studies presented showed what other discoveries could be made.
A Norwegian study compared meth rates in wastewater with hospitalisations from psychosis, while a UK study investigated the state of public health in a catchment area simply by measuring stress biomarkers.
"Other studies analysed exposure to food contaminants, plasticisers, infectious disease, human obesity, all by analysing the biomarkers excreted by people in the catchment area," he said.
"Instead of taking months or years to test thousands of samples of urine and analyse them in any one study, analysing wastewater can provide results about a population in real time enabling interventions that could save lives.
"The opportunities are limitless."