Jump to content
X2Community Forums

recording Web Tracking Key with creating new lead by api2


Recommended Posts

Hello,

I have got a problem with recording Web Tracking Key. I am using api2 for web lead capture. There is a hidden field with name="x2_key" in my form, in which webTracker.js generates web-tracking-key. I can see this key in value of the hidden field on my page. I send this value by api2 e.g.
 

payload = {
                "firstName":name,
                "lastName":lastname,
                "phone":phone,
                "email":email,
                "leadSource":"Website",
                "trackingKey":trackingkey,
                "visibility":1 }

I get <Response [201]> from server. I see that name, last name, phone, email, lead source are recorded successfully, but there is a record

"trackingKey":null,

and I haven't got that tracking key...

What's problem? How can I solve the problem?
Thank you for your help

 

Link to post
Share on other sites

I was testing some requests by Postman. I have discovered the following. If I use https://crm.mydomen.com/index.php/api2/Contacts  in api2 request, it creates new contact and web tracking key is recorded for one. And if I use https://crm.mydomen.com/index.php/api2/X2Leads in api2 request, it creates new lead but web tracking key is NOT recorded for one.

How can I do this for creating leads?

Link to post
Share on other sites

Hi Vatalii,
A lot of the web form and tracking is designed for use with just the contact model. You can get it to work with x2leads but you have to make modifications to the code and tables. If you want to start on these changes you'll first have to work with expanding the "fingerprint" model to work with Leads.
-Jack

Link to post
Share on other sites

Thank you Jack!

What modification in tables and code do I have to make? There is enable fingerprinting and Web Tracker in X2Identity Settings.
There is an email to new web form lead in my workflow. I would like to send email with Web Tracking Key link to new lead, I would like to know if new lead reads the email. But I won't like to save him as new contact because a new lead have not been qualified by me. And does X2CRM save tracking key for contact if I convert lead to contact or does contact have new tracking key ( not web lead tracking key)?

Link to post
Share on other sites

I can't lay out all the steps since I don't know them all. You would need to create/modify 20 files or more. Adding fingerprinting to leads is not something I would recommend trying unless you have a lot of php and js programing experience as this would entail a lot of your own testing to ensure it works correctly.
-Jack

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...