We present a simple proof of asymptotic consensus in the discrete Hegselmann--Krause model and flocking in the discrete Cucker--Smale model with normalization and variable delay. This proof utilizes the convexity of the normalized communication weights and a Gronwall--Halanay-type inequality. The main advantage of our method, compared to previous approaches to the delay Hegselmann--Krause model, is that it does not require any restriction on the maximal time delay, or the initial data, or decay rate of the influence function. From this point of view the result is optimal. For the Cucker--Smale model it provides an analogous result in the regime of unconditonal flocking with sufficiently slowly decaying communication rate, but still without any restriction on the length of the maximal time delay. Moreover, we demonstrate that the method can be easily extended to the mean-field limits of both the Hegselmann--Krause and Cucker--Smale systems, using appropriate stability results on the measure-valued solutions.