Skip to content

feat: push replay and person data to intercom and crisp chat #2039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

pauldambra
Copy link
Member

replaces #1980

easier to recreate than fangle the merge


if you've got intercom or crisp chat on your site, you might want to auto-link session replay to user interactions

you can do this manually but it might be nice to make it easy for folk

crisp

Screenshot 2025-05-29 at 11 56 04

intercom

Screenshot 2025-05-29 at 11 16 32 Screenshot 2025-05-29 at 11 16 28

Copy link

vercel bot commented Jun 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Jun 25, 2025 11:50am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Adds integration support for Intercom and Crisp Chat to automatically link PostHog session replays and person data with chat conversations.

  • New external integration system in packages/browser/src/extensions/external-integration.ts manages dynamic loading and lifecycle of chat integrations
  • Security concerns in packages/browser/playground/nextjs/pages/external_chat.tsx with hardcoded API keys/IDs and script loading approach
  • Extended type system in packages/browser/src/types.ts with new ExternalIntegrationKind and config options for integration management
  • Implementation in packages/browser/src/entrypoints/intercom-integration.ts and crisp-chat-integration.ts tracks session IDs to prevent duplicate updates
  • CSP updates in packages/browser/playground/nextjs/pages/_app.tsx to allow connections to third-party chat services

11 files reviewed, 8 comments
Edit PR Review Bot Settings | Greptile

@pauldambra pauldambra added the bump minor Bump minor version when this PR gets merged label Jun 25, 2025
Copy link

github-actions bot commented Jun 25, 2025

Copy link

github-actions bot commented Jun 25, 2025

Size Change: +10.7 kB (+0.3%)

Total Size: 3.58 MB

Filename Size Change
packages/browser/dist/array.full.es5.js 308 kB +1.9 kB (+0.62%)
packages/browser/dist/array.full.js 372 kB +971 B (+0.26%)
packages/browser/dist/array.full.no-external.js 389 kB +989 B (+0.25%)
packages/browser/dist/array.js 171 kB +963 B (+0.56%)
packages/browser/dist/array.no-external.js 186 kB +983 B (+0.53%)
packages/browser/dist/main.js 173 kB +963 B (+0.56%)
packages/browser/dist/module.full.js 372 kB +971 B (+0.26%)
packages/browser/dist/module.full.no-external.js 389 kB +989 B (+0.25%)
packages/browser/dist/module.js 172 kB +963 B (+0.56%)
packages/browser/dist/module.no-external.js 187 kB +983 B (+0.53%)
ℹ️ View Unchanged
Filename Size
packages/browser/dist/all-external-dependencies.js 220 kB
packages/browser/dist/crisp-chat-integration.js 1.97 kB
packages/browser/dist/customizations.full.js 15.9 kB
packages/browser/dist/dead-clicks-autocapture.js 12.6 kB
packages/browser/dist/exception-autocapture.js 9.55 kB
packages/browser/dist/external-scripts-loader.js 2.57 kB
packages/browser/dist/intercom-integration.js 2.02 kB
packages/browser/dist/posthog-recorder.js 207 kB
packages/browser/dist/recorder-v2.js 113 kB
packages/browser/dist/recorder.js 113 kB
packages/browser/dist/surveys-preview.js 70.7 kB
packages/browser/dist/surveys.js 78.8 kB
packages/browser/dist/tracing-headers.js 1.63 kB
packages/browser/dist/web-vitals.js 10.4 kB

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump minor Bump minor version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant