Client Library Custom Implementation

Custom implementation use cases, what's in Client Library along with Methods and implementation instructions.

Custom Implementation Use Cases

Use Case: Custom or 3rd Party Cookie Consent Notifications and Settings

Some sites create their own cookie consent popups some of which also contain toggles that match GDPR standard practice related to Analytics, Performance, or other cookie options.

Use Case: Mobile apps or other software

Software developed natively in Xcode, using a mobile game platform like Unity, or creating other kinds of software may not have any html to add the Concord javascript code into.

Use Case: Read receipts for Terms of Service, Clickthrough agreements, EULAs...

May online services, cloud services, and software solutions require users to read and accept agreements before use of the service. Capturing the history of each required element in such agreements is another good use case for adding Concord consent events.

Custom Types of Consent Events to Consider

Step 1: Do you need to capture a "view" event (like scrolling through a EULA to it's end)?

Example: A person playing an online game must agree to the terms of service that specify the game developer is not responsible for instability of internet connections or service outages. Concord captures a consent event when she scrolls to the end of the entire agreement before being allowed to continue.

Step 2: Do you need to capture an explicit acknowledgement?

Example: A software EULA has an "I Accept" prompt at the end of the agreement. Concord captures the explicit agreement noting the "accept" state.

Step 3: Do you need to capture a link to the username, internal ID, signature or other identifying element of the user?

Example: A new user creates a login using her email address. This email address is the primary key in the customer record. When she logs in for the first time and sees the clickthrough agreement, Concord captures her username (email) as part of the consent event and agreement.

Implementing Client Library

Add listeners and click actions to capture Consent Events

concordReady

If you are using your own or a 3rd party cookie consent popup, for example, the selection toggles for consent options would go in the concordReady function.

addConsentEvent

Adding consent events by category and type.

If this is a toggle on/off be sure to submit the correct “grant” based on the state of the users consent to accept or deny the grant.

window.concord.addConsentEvent: parameters
//required: category, required: urnType, required: grant, optional: details

Additional Functions - Current User Consent Status

getConsentHistory

In order to properly display the current status of a users consent for any specific consent type use getConsentHistory.

For example, this allows developers to properly display the state of cookie consent options.

Developers should use the grant or deny state of consent in conditional code to turn off trackers that the current user may have declined.

window.concord.getConsentHistory

findConsentEventByType

Returns any consent events that match a specific type.

This is useful for selecting the consent events that match a specific use in common website or application code like turning on/off social features or tracking based on user consent.

window.concord.findConsentEventByType: parameters
//required: category, required: type, optional: version

findConsentEvent

Because terms of service, cookie consent options, etc. are updated regularly, consent events when they are executed contain a version so it is clear which version of the terms were agreed to by the person accepting the consent terms.

Since developers will want code that remains up to date regardless of when terms are update on the site or in the application, new consent events default to the latest version.

An important (but optional) use case however is developers may want to automatically trigger a new consent popup or notification if the current user accepted a previous version. Passing the dataURN to the findConsentEvent function will return the status of a specific consent as well as the latest version.

Specific consent events by type can be referenced with the dataURNs (registered in the Admin console for Concord).

window.concord.findConsentEvent: parameters
//required: dataUrn

Development and Debugging Functions

window.concord.grant

Returns an enum of allowed grant values

  • Allow
  • Deny
  • Accept

window.concord.consentSource

Consent events can also specify where the consent was obtained. For most applications they are triggered by user actions but in some cases consent was obtained from another source.

  • 'UserClick',
  • 'UserLogin',
  • 'UserSignature',
  • 'UserRegistration',
  • 'ExistingDataImport',
  • 'ExistingDataLegacy',
  • 'ExistingDataExternal',
  • 'MaintenanceDataExpiration',
  • 'ComplianceUserRequest',
  • 'ComplianceInternal',