The TrustPid services can be started by using dedicated function. It has both synchronous and asynchronous invocation options. If you want to retrieve/use information such as mtid and atid, you have to start the service with asynchronous variant.
You can use the isStub
parameter which is false by default, if not provided. It allows testing the TrustPid Service if you don’t have an eligible SIM card.
The TrustPid Services requires the user consent, without consent acceptance, no API calls will be made, hence the TrustPid service will not start. See User Consent
section.
Synchronous:
funnelConnectSdk.trustPid().startService();
Asynchronous:
funnelConnectSdk
.trustPid()
.startTrustPidServiceAsync()
.then(({mtid, atid}) => {
/* Do something with mtid and atid */
})
.catch(error => {
/* Do something with the error */
});
Synchronous:
funnelConnectSdk.trustPid().startService(true);
Asynchronous:
funnelConnectSdk
.trustPid()
.startTrustPidServiceAsync(true)
.then(({mtid, atid}) => {
/* Do something with mtid and atid */
})
.catch(error => {
/* Do something with the error */
});
Result is typed, so if you are using typing, you can use IdcData
type to make sure you are using a correct object.
funnelConnectSdk
.trustPid()
.startTrustPidServiceAsync(true)
.then((idcData: IdcData) => {
/* Do something with idcData.mtid and idcData.atid */
})
.catch(error => {
/* Do something with the error */
});
This function returns a boolean value indicating the consent status of the user. The return value is of type boolean
, true
for accepted status and false
for rejected status.
funnelConnectSdk
.trustPid()
.isConsentAcceptedAsync()
.then(isConsentAccepted => {
/* Do something depending on isConsentAccepted value */
})
.catch(error => {
/* Do something with the error */
});
You can use this function to check the user’s consent before showing a dialog asking for his consent.
This function can be used after showing a prompt/alert to the user to accept the consent for the TrustPid service. It has both synchronous and asynchronous invocation options.
Synchronous:
funnelConnectSdk.trustPid().acceptConsent();
Asynchronous:
funnelConnectSdk
.trustPid()
.acceptConsentAsync()
.then(() => {
/* Do something after consent is granted */
})
.catch(error => {
/* Do something with the error */
});
This function does not show any alert, and you should use an alert with the look and feel relative to your application theme to ask for the user’s consent.
With this function, we can reject the user’s consent, if the user changed his mind or if we want to reset the user’s consent.
Synchronous:
funnelConnectSdk.trustPid().rejectConsent();
Asynchronous:
funnelConnectSdk
.trustPid()
.rejectConsentAsync()
.then(() => {
/* Do something after consent is granted */
})
.catch(error => {
/* Do something with the error */
});
This function does not show any alert, and you should use an alert with the look and feel relative to your application theme to ask for the user’s consent.
This is the so-called MarTechID, a persistent identifier for the user of a Data Controller. It is a Sha256 (64 bytes) string, which remains persistent for 90 days (or what has been agreed on and set).
Correspond to the AdTechID string value with a telco-specific acronym as a suffix delimited by a hyphen. The telco acronym is required by the authorized DSPs to select the correct decryption key to decrypt the AdTechID and get to the clear umid value which can then be used for audience matching. The AdTechID can be passed via OpenRTB or other protocols to deliver targeted ads on 3rd party media.
Example AdTechID with test stub telco:
acronym: "UQbjXiNbTpMGjKdI2+cRoHAm7OlyzNSc2uKwGKf0L3BP36eJu16ajJ93Pn52qFbkoZfEySysH/mdaKvHC/BKgA==-ndye"