I’m looking for an easy way to capture newsletters subscribers using a form on my HTML/JS landing page. Right now, I have a simple form that sends the data to Mailchimp. I now have to export subscribers from Mailchimp and manually import them in Mixpanel. This has two downsides:
- it creates duplicate profiles as I have no distinct_id to match with users who are already in Mixpanel (because they’ve signed up inside the mobile app we’re offering)
- it takes a lot of time
Is there a way to change the form so that new subscribers end up directly in Mixpanel, without creating duplicate profiles?
Best answer by raja
In your VueJS code you have a ‘submit’ method for the Mailchimp form, it looks a bit like my screenshot below.
In the function I highlighted above in the screenshot is where you would write the Mixpanel JS SDK ccode to create the user profile, here is the JS SDK doc that explains how to do that.