{"id":13536,"date":"2024-03-20T16:46:29","date_gmt":"2024-03-20T15:46:29","guid":{"rendered":"https:\/\/helpcenter.blendee.com\/article\/pass-the-lead-generation-form-data-in-real-time-to-blendee\/"},"modified":"2024-03-20T16:46:29","modified_gmt":"2024-03-20T15:46:29","slug":"pass-the-lead-generation-form-data-in-real-time-to-blendee","status":"publish","type":"article","link":"https:\/\/helpcenter.streamwise.it\/en\/article\/pass-the-lead-generation-form-data-in-real-time-to-blendee\/","title":{"rendered":"Pass the Lead Generation form data, in real-time, to Blendee."},"content":{"rendered":"\n<p>It is possible to send, in real-time, users who subscribe to Lead Generation forms to Blendee and have, right away, the ability to track the activities carried out by the customer.<\/p>\n\n<p>This is very useful in content sites or in general in sites where the concept of registered user is envisaged.<\/p>\n\n<p>However, it is possible to associate a user to submit a form by also recording the personal data (if present in the form fields).<br\/>To do this, it is necessary to intercept the submit of the form and insert a custom JS code to allow the execution of this action.<\/p>\n\n<p>Here&#8217;s sample code:<\/p>\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;title&gt;Title&lt;\/title&gt;\n    &lt;script type=\"text\/javascript\" src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/blueimp-md5\/2.10.0\/js\/md5.min.js\"&gt;&lt;\/script&gt;\n    &lt;script type=\"text\/javascript\" src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jquery\/3.4.0\/jquery.min.js\"&gt;&lt;\/script&gt;\n\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;form id=\"form\"&gt;\n    Nome: &lt;input type=\"text\" name=\"nome\" value=\"Mario\" \/&gt;&lt;br&gt;\n    Cognome: &lt;input type=\"text\" name=\"cognome\" value=\"Rossi\" \/&gt;&lt;br&gt;\n    Email: &lt;input type=\"text\" name=\"email\" value=\"mario.rossi@gmail.com\" \/&gt;&lt;br&gt;\n\t&lt;input type=\"submit\" value=\"Invia\" \/&gt;\n\n&lt;\/form&gt;\n&lt;\/body&gt;\n&lt;script type=\"text\/javascript\"&gt;\n    $(function() {\n        $('#form').on(\"submit\",function(e) {\n            e.preventDefault();\n\n            var nome = $('input&#91;name=nome]').val();\n            var cognome = $('input&#91;name=nome]').val();\n            var email = $('input&#91;name=nome]').val();\n            var uid = md5(email);\n\n            var comunicazioniCommerciali = false;\n            var iscrizioneNewsletter = false;\n\n            _sbnaq.push(&#91;'trkUserRegistration', uid, email, nome, cognome, iscrizioneNewsletter, comunicazioniCommerciali]);\n        });\n    });\n&lt;\/script&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<div class=\"wrap-post-useful post_useful_13536\">\n<p><div style=\"color: black; margin-bottom: 15px;\"><strong>Was this content useful?<\/strong><\/div><\/p>\n<p class=\"post_useful_success post_useful_success_13536\">Thanks for contributing!<\/p>\n<div class=\"post-useful-buttons post_useful_buttons_13536\">\n<a href=\"javascript:;\" style=\"border:0px;\" title=\"Yes\" class=\"post-useful-vote post-useful-vote-yes\" data-id=\"13536\" data-rate=\"1\">Yes<\/a>\n<a href=\"javascript:;\" style=\"border:0px;\" title=\"No\" class=\"post-useful-vote post-useful-vote-no\" data-id=\"13536\" data-rate=\"0\">No<\/a>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>It is possible to send, in real-time, users who subscribe to Lead Generation forms to Blendee and have, right away, the ability to track the activities carried out by the customer. This is very useful in content sites or in general in sites where the concept of registered user is envisaged. However, it is possible [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"template":"","format":"standard","article-category":[638,623],"article-tag":[605,753],"class_list":["post-13536","article","type-article","status-publish","format-standard","hentry","article-category-contents","article-category-users","article-tag-tracking","article-tag-user-master-data-en"],"_links":{"self":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13536"}],"collection":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13536\/revisions"}],"predecessor-version":[{"id":13538,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article\/13536\/revisions\/13538"}],"wp:attachment":[{"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/media?parent=13536"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article-category?post=13536"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/helpcenter.streamwise.it\/en\/wp-json\/wp\/v2\/article-tag?post=13536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}