Mixpanel Community Icon

Integrating Metadata in Mixpanel Autocapture for React

·
·

I have a question about the Javascript library, in usage within our React application. I'm working to integrate the autocapture into our Mixpanel analytics. Part of that work is adding metadata to the properties captured in the autocapture. In this particular example, the "click" is captured automatically (working), but the metadata I want attached with it isn't getting captured. I'm using the capture_extra_attrs prop on the autocapture object during initialization, as seen below. I've verified the data tags are in the DOM as well. It just seems to not respect any attrs I add to this array. Any help would be much appreciated!

autocapture: {
        capture_extra_attrs: [
          'data-analytics-component',
          'data-analytics-action',
        ],