Skip to content
  • Home
  • Developers
  • API
  • Releases
  • Community
  • University
  • Status
  • Home
  • Developers
  • API
  • Releases
  • Community
  • University
  • Status
Home Integrations A/B Testing & Personalization LaunchDarkly Integration
Session Replay Getting Started Administration Data Management Definitions Charts Analysis Examples Heap Plays Integrations Heap Connect Data Privacy

Table of Contents

Was this article helpful?

Yes No

Thank you for your feedback!

LaunchDarkly Integration

This doc is for: Admins Architects

The Heap integration with LaunchDarkly allows you to send data from LaunchDarkly into Heap. You’ll need to attach LaunchDarkly’s user key and feature flags as user and event properties in Heap.

If you’re using addEventProperties, be sure to double-check the length of the cookie—there is a max of 4kb for the props cookie and most servers have an 8kb cookie load limit. You can calculate the cookie size of passing all feature flags by in the browser console.

If you’re noticing none values on your non-pageview events while doing your analysis in HoH, that’s a good sign that you need to call clearEventProperties to ensure you’re under the browser cookie limit.

encodeURIComponent(JSON.stringify(ldclient.allFlags())).length

You can also add user flags as user properties.

// get LaunchDarkly user ID and send to Heap as user property

var ldUserId = ldclient.getUser().key
heap.addUserProperties({"ldUserId": ldUserId});

/ /get LaunchDarkly feature flags and attach as properties to all events

var ldProps = ldclient.allFlags();
heap.addEventProperties(ldProps);

It’s also important to note that the LaunchDarkly client initializes after Heap does, so those flags that we add are best analyzed with non-pageview events.

Was this article helpful?

Yes No

Thank you for your feedback!

Last updated July 6, 2022.

integrationlaunchdarklylaunchdarkly source
  • Blog
  • Partners
  • Legal
  • Security
  • Terms
  • About
  • Careers
  • Privacy
  • Contact Us

© 2023 Heap, Inc.