We followed the instructions provided by mixpanel to install the tracking script. Unfortunately, this caused our website to take users to the "/undefined" page after they have clicked the "Submit" button on our mailchimp form.
We noticed in the script there are snippets of "undefined"(to be exact, there are 2 of them). We changed the strings by replacing "undefined" with "#thankyou" and it resolved our issue , however it broke the mixpanel tracking script.
Would love to know how we can resolve this and get mixpanel working again without having to make sacrifices to our site or moving away from mixpanel into another analytics platform.
Let me know if you would like more clarification!
I will upload appropriate images for context.
MailChimp Forward should take user to #thankyou but instead gets overwritten by MixPanel's script and takes us to "undefined" instead.
Attempt to fix by replacing "undefined" with "#thankyou" as a result breaking the MixPanel script.