I have a basic demo UI for consent collection:
func _ready():
# don't show if consent already requested
print(Analytics.should_show_consent_dialog())
print(Analytics.consent_requested)
print(Analytics.consent_granted)
if not Analytics.should_show_consent_dialog():
print("Skipping consent check...")
queue_free()
func _on_approve_pressed():
Analytics.approve_data_collection()
queue_free()
func _on_deny_pressed():
Analytics.deny_data_collection()
queue_free()
No matter what the user presses, the UI will always pop up every time. Analytics.should_show_consent_dialog() prints true, even when the analytics.cfg file records the consent properly and events are being fired. Even if Analytics.consent_granted is true, Analytics.consent_requested is always false at startup.