I wanted to use the new analytics consent mode which is gdpr compliant following this official guide
Placed following into the header: