Ijmāʿ does not mean the popularity of an opinion. It denotes the agreement of qualified jurists, on a legal question, under the conditions specified by the discipline of legal theory. Traditional arguments for its authority invoke transmitted reports about the community not uniting upon error.
لا تجتمع أمتي على ضلالة
My community will not unite upon misguidance.
Hadith specialists and legal theorists discuss the transmissions and their probative use in detail. Establishing that consensus actually occurred is a different task from explaining why genuine consensus carries legal authority. A prominent jurist's opinion, a local practice or wide scholarly support does not automatically establish formal universal consensus.
The question, the era and the class of jurists whose agreement is being asserted must be identified before a claim of ijmāʿ can be evaluated.