You can check if user has consented using the hasConsented method. This can be done in other javascript files or any inline javascript block. Make sure Cookie Consent is included above this in your web page's source.