...
It is important, that the onpage tag can detect parameters that are relevant for attribution of incoming traffic (like the iclid, amc, others). If only loaded with the next page view this information is lost.
Support TCF 2.0
In order to transmit and receive consent, the framework TCF 2.0 can be used.
read more here: IAB Transparency & Consent Framework v2.0
...