External Identifier

Starting from v1.6.0, you can pass the CMP your user's identifier instead of relying on SFBX's generated one.

It is important to enable the External Id option to use this feature, since it is not compatible with it.

External Id has to be enabled

You can then change the snippet this way:

__cmp('ac_showConsentToolIfNeeded', { externalId: '<your-id>' }, function (a, b) {})

Please ensure <your-id> is a hash of some sort identifying your user (and not an email for example). This is needed since we'll start to save those in a foreseeable future.

Using this feature makes the getConsentData call tied to the ac_showConsentToolIfNeeded. This implies that no ConsentString will be returned until a call to ac_showConsentToolIfNeeded. It's also the reason why External Id has to be enabled.