Implement Segment TrustArc wrapper and consent-based third-party script loading #197
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Followup to #196 which switched from Ketch to IBM TrustArc. This PR implements the Segment TrustArc wrapper for consent-aware analytics tracking and adds consent checking to third-party scripts (Intercom).
Based on implementation from langflow-ai/website PR #71.
Changes
Segment Integration with TrustArc Wrapper
trustarc-segment-wrapper-v1.1.js)TrustArcWrapper.withTrustArc()to respect consentdata-event,data-cta, etc.) following IBM standardsConsent-Based Script Loading
cm_data_subject_consent_changed,cm_consent_preferences_set)Google Consent Mode v2
Script Loading Order Fix
head-scripts.hbs<head>Footer Update
window.truste.eu.clickListener()site.keys.ketchSmartTagUrltosite.keys.ibmAnalyticsEnabledFiles Modified
Configuration Required
Update Antora playbook:
Update
head-scripts.hbsIBM Segment Common Properties:How Consent Flow Works
<head>(Google Consent Mode default: denied)cm_consent_preferences_seteventEvent Tracking Examples
CTA Clicked Event
Sends to Segment:
UI Interaction Event
Sends to Segment:
TrustArc Consent Categories
References