mqarchane / Mautic-facebook

Use Facebook Webhook and Mautic API to automatically create contact in Mautic when a Lead is generated via Facebook ads
GNU General Public License v3.0
60 stars 24 forks source link

HOW CAN I HELP #1

Open jeffersonmidei opened 7 years ago

jeffersonmidei commented 7 years ago

Dear @mrfossil ,

Amazing job... I had to wrote a similar code to integrate my Facebook Leads Ads to my Mautic Installation and I lost several hours on this... But I didn't think about push my code to github... Thanks for that...

I want to help this project... How can I?

I could write a documentation or make some tests... But, how could I start? Should I copy these your two files to my mautic root? and should I set the my server webhook.php URL at the Facebook App Settings?

Just, please, let me know how can I help, ok?

Bye,

JM:.

ahfauth commented 7 years ago

Thanks for sharing! Any tutorials on this? I have no idea on how to use it.

I would love to be able to integrate Mautic and Face Leads!

mqarchane commented 7 years ago

are you guys still interested on integrating Mautic with Facebook Leads? i can make a video tutorial to explain how.

LuisBeOnline commented 7 years ago

Do it please

Em 04/03/2017 16:48, "mrfossil" notifications@github.com escreveu:

are you guys still interested on integrating Mautic with Facebook Leads? i can make a video tutorial to explain how.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mrfossil/Mautic-facebook/issues/1#issuecomment-284163886, or mute the thread https://github.com/notifications/unsubscribe-auth/AHQlfE1twQ3b740hAGrOftt66uAxwoCUks5riZXrgaJpZM4LiO3S .

ahfauth commented 7 years ago

Yes please!

On Mar 5, 2017 00:51, "Luis Marques" notifications@github.com wrote:

Do it please

Em 04/03/2017 16:48, "mrfossil" notifications@github.com escreveu:

are you guys still interested on integrating Mautic with Facebook Leads? i can make a video tutorial to explain how.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mrfossil/Mautic-facebook/issues/1# issuecomment-284163886, or mute the thread https://github.com/notifications/unsubscribe-auth/ AHQlfE1twQ3b740hAGrOftt66uAxwoCUks5riZXrgaJpZM4LiO3S .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mrfossil/Mautic-facebook/issues/1#issuecomment-284164078, or mute the thread https://github.com/notifications/unsubscribe-auth/AIkqsJcTKJe6-88OnKz8AC3aeANB6xfWks5riZadgaJpZM4LiO3S .

mqarchane commented 7 years ago

Here is the video tutorial https://youtu.be/Jr98BOamcGo

This is my first video tutorial and English is my second language so please let me know if you didn't understand something or you have any questions.

altomarketing commented 7 years ago

@mqarchane Excellent tutorial, but is it for Facebook Leads Ads ? or its for Leads that are generated using Facebook share login thats sends users data to Mautic ? Can you share how to integrate this app with [LEADS Ads forms] facebook.com >> publishing_tool >> ?section=LEAD_ADS_FORM . In my case https://www.facebook.com/MYFACEIDhere/publishing_tools/?section=LEAD_ADS_FORM

mqarchane commented 7 years ago

This tutorial is for Facebook Leads Ads when you create a lead generation ad in facebook you will need to download and upload them manually. With what i explained in the video, leads will be added automatically to your Mautic and get all the benefits of Mautic Marketing automation :)

ahfauth commented 7 years ago

Great Video! Thanks a lot Mounir!

Even with the video it's still a hassle to setup this. Mautic should have something official.

I will give it a try soon!

2017-03-09 5:47 GMT+07:00 Mounir Qarchane notifications@github.com:

this tutorial is for Facebook Leads Ads when you create a lead generation ad in facebook you will need to download and upload them manually with what i explained in the video they will be added automatically to your Mautic and get all the benefits of Mautic Marketing automation :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mqarchane/Mautic-facebook/issues/1#issuecomment-285195371, or mute the thread https://github.com/notifications/unsubscribe-auth/AIkqsEk6Ixj7EisoTYWv08yKlYkkhUupks5rjzAcgaJpZM4LiO3S .

--

André Helmuth Fauth

www.andrefauth.com http://www.andrefauth.com

+55 (21) 99954-0934 (VIVO/Whatsapp) +55 (21) 96501-4976 (TIM)

mqarchane commented 7 years ago

Thanks! let me know if you have trouble setting this up and i will try to help you

saint2016 commented 7 years ago

@mqarchane it is so amazing of you to share this, I will install it later this week but wanted to thank you in advance. Really nice work!

mqarchane commented 7 years ago

There is an easier way to do this using forms instead of the Mautic API i will try to share it when i have some time

saint2016 commented 7 years ago

Thanks so much for sharing the form code as well, it worked as a charm. My one tip while implementing to everyone is to check the variable names and values from mautic ([mautic url]/form/[form id] before coding into the script as there was some unexpected behavior there.

For example, boolean fields had values 0/1 or names were a bit different than I thought because I had fiddled too much with the form in mautic etc.

There also is a small bug in your code, the $lead_email conversion from json is in wrong order, the right order should be as per your api based webhook:

$lead_email = $data['field_data'][0][values][0]; $lead_first = $data['field_data'][1][values][0]; $lead_last = $data['field_data'][2][values][0];

The only downside to this approach is that Mautic somehow saves the server IP as the contact's IP, there must be a way around this but couldn't figure out yet.

UPDATE: I got this sorted, to prevent Mautic from recording the IP address of the server as the contact's IP address, simply enable the "Kiosk Mode" in the form.

mqarchane commented 7 years ago

@saint2016 Thank you for the feedback this was a fast implementation didn't take the time to verify everything. I am glad it worked for you.