I want to implement Mautic Setup in JavaScript Project

I have a Website
My Mautic version is: “I don’t confirm”
My PHP version is: "I am using JavaScript "
My Database type and version is:10.4.20-MariaDB-1:10.4.20+maria~buster-log

Your problem
My problem is:
I already have a Mautic setup,but Please guide me how use Mautic in JavaScript or in Reactjs,( I want to implement it for Newsletter Subscription in my Reactjs or you can say Html website) I have some Idea, but its not enough for me now,
Can you please give provide me any library or Manual code to solve this problem.
and I am not facing any error because I not implemented Mautic in my Project yet
Steps I have tried to fix the problem: I also found a library but it doesn’t working for me!
You help will be much appreciated
Thanks you so much!

Show us, what you have up to this point - and please specify in a bit more detail what do you want mautic to do in relation to react app.

You can always send contact you obtain from react form to mautic api.

Greetings mzagmajster!,
Thank you so much for your response.
Below are more details which hopefully can help you!
I have a ReactJs(or Simply you can say HTML, JavaScript) Website with a new letter subscription optin form and I want to set up it with Mautic Platform, I already setup Mautic as you can in from the attached Image., But I need to integrate it into my Reactjs( Html, JavaScript) Website Project. But I don’t know how to do that, how to Integrate or call Mautic API to obtain data of user(Website Visitor) Email and save it on my Mautic Setup on the click of Email button Function(Which Reactjs or JavaScript code I need to write in function ).
Info : The website is hosted in Netlify so subscriber function leverages netlify
Thanks for your Valuable to Time to solve my Problem
Regards
Daud Ahmed

Hi @daudahmed,

well since you are using react I am assuming you have a custom form, i would try to send data from react to mautic using this:

< Contact tracking | Mautic >

On the other hand if you want to use forms from mautic and just embed them to react that would work to I think. Although I must say the first approach seems better.

Thanks Mzagmajste, What a Great Support From you!.
Yes, Sir I have my custom Form Front-End Code.
Please Dear Mzagmajste, Please Send me the Code according to Reactjs
Your Time is Valuable for me , After this, Sir I can also Pay for support!
Thanks

Hi,

this is copied and adapted from the site above:

mt('send', 'pageview', {email: 'my@example.com', firstname: 'MyName',, lastname: 'MyLastName',  tags: 'myFormTag'});

You should first include mautic script in your react app (you can get the script in mautic tracking settings).

Then after form submission you get the data from react form/redux and you put it in json above. It should update the contact with the data from the form.

Note

This enables you to send data to mautic via mautic tracking script - so its not really form submission from mautic point´s of view…

Anyway I hope this works well for you at the end :slight_smile: