TrustPid Service

Starting TrustPid service:

The TrustPid services can be started by using this piece of code:

try? FunnelConnectSDK.shared.trustPid().startService()

If you want to retrieve/use information such as mtid and atid, you can start the service with closure

try? FunnelConnectSDK.shared.trustPid().startService(dataCallback: { [weak self] idcData in
            
        }, errorCallback: { [weak self] error in
        
})

The TrustPid Services requires the user consent, without consent acceptance, no API calls will be made hence the TrustPid service will not start:

You can use the isStub parameter which is false by default if not passed to test the TrustPid Service if you don’t have an eligible SIM card.

This function returns a boolean value indicating the consent status of the user (accepted or rejected).

try? FunnelConnectSDK.shared.trustPid().isConsentAccepted()

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.

try? FunnelConnectSDK.shared.trustPid().acceptConsent()

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.

try? FunnelConnectSDK.shared.trustPid().rejectConsent()

Because this is an API call, you might want to do something when the request comes with a response, either success or failure, so you can use the same function above but with success and failure closures.

try? FunnelConnectSDK.shared.trustPid().rejectConsent(successCallback: { [weak self] in
            
        }, errorCallback: { [weak self] error in
            
})

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.

References:

mtid

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).

atid

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"