{"id":25,"date":"2012-12-05T09:20:45","date_gmt":"2012-12-05T09:20:45","guid":{"rendered":"http:\/\/www.improvely.com\/docs\/?p=25"},"modified":"2016-06-29T23:26:12","modified_gmt":"2016-06-29T23:26:12","slug":"labeling-visitors","status":"publish","type":"post","link":"https:\/\/www.improvely.com\/docs\/labeling-visitors","title":{"rendered":"Using the Visitor Labeling Code"},"content":{"rendered":"<p>Improvely creates a profile of each person visiting your website containing all of their past visits and conversions. You can label and search these profiles by an e-mail address, username or other identifier by using this code on your site after the visitor has identified themselves &mdash; by registering, purchasing or signing in. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.improvely.com\/blog\/wp-content\/uploads\/2015\/02\/profile.png\" class=\"size-full\" \/><\/p>\n<p>From your <a href=\"choosing-your-project-settings\">project&#8217;s settings page<\/a>, click on the <b>Get This Project&#8217;s Website Code<\/b> button to retrieve the <a href=\"landing-page-code\">Website Code<\/a>, <a href=\"conversion-code\">Conversion Code<\/a> and Visitor Labeling Code for your site.<\/p>\n<p><b>Use of this code is optional and requires custom programming.<\/b><\/p>\n<p>To add the code to your website:<\/p>\n<ol>\n<li>\n<p><b>Click the Copy to Clipboard button to copy the code to your computer&#8217;s clipboard.<\/b> Alternatively, highlight the code with your mouse and press CTRL+C or CMD+C.<\/p>\n<\/li>\n<li>\n<p><b>Paste the code into a webpage visitors see after identifying themselves.<\/b><\/p>\n<p>For example, add it to the page shown after someone logs in to an account, or after they fill out a signup form containing their e-mail address.<\/p>\n<p>Include the Visitor Labeling Code underneath the Website Code you&#8217;ve already added to your page. Example:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;!-- Website Code --&gt;\r\n&lt;script type=&quot;text\/javascript&quot;&gt;\r\n&lt;script type=&quot;text\/javascript&quot;&gt;\r\nvar im_domain = 'demo';\r\nvar im_project_id = 1;\r\n(function(e,t){window._improvely=[];var n=e.getElementsByTagName(&quot;script&quot;)[0];var r=e.createElement(&quot;script&quot;);r.type=&quot;text\/javascript&quot;;r.src=&quot;https:\/\/&quot;+im_domain+&quot;.iljmp.com\/improvely.js&quot;;r.async=true;n.parentNode.insertBefore(r,n);if(typeof t.init==&quot;undefined&quot;){t.init=function(e,t){window._improvely.push([&quot;init&quot;,e,t])};t.goal=function(e){window._improvely.push([&quot;goal&quot;,e])};t.conversion=function(e){window._improvely.push([&quot;conversion&quot;,e])};t.label=function(e){window._improvely.push([&quot;label&quot;,e])}}window.improvely=t;t.init(im_domain,im_project_id)})(document,window.improvely||[])\r\n&lt;\/script&gt;\r\n\r\n&lt;!-- Visitor Labeling Code --&gt;\r\n&lt;script type=&quot;text\/javascript&quot;&gt;\r\nimprovely.label('example@example-email.com');\r\n&lt;\/script&gt;<\/pre>\n<\/li>\n<li>\n<p><b>Add your code to output the visitor&#8217;s e-mail address.<\/b><\/p>\n<p>For example, <code>improvely.label('&lt;?php echo $email; ?&gt;');<\/code><\/p>\n<p>The exact code you need will depend on your website, how and in what language it is programmed, and where you are collecting the visitor&#8217;s e-mail address. This is not code that we provide. It is code that your website developer must write.<\/p>\n<p>This information will appear at the top of the visitor&#8217;s profile in your account.<\/p>\n<\/li>\n<\/ol>\n<p><span style=\"color: #c00; font-weight: bold\">Warning:<\/span> This code requires custom programming to use. You must output the e-mail for the visitor currently on your site, which you would do by writing your own code to e.g. output the data submitted to a form. <u>Never hard-code a static identifier like &#8220;anonymous&#8221; or &#8220;guest&#8221;<\/u>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Improvely creates a profile of each person visiting your website containing all of their past visits and conversions. You can label and search these profiles by an e-mail address, username or other identifier by using this code on your site after the visitor has identified themselves &mdash; by registering, purchasing or signing in. From your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-settings"],"_links":{"self":[{"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":14,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":119,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/posts\/25\/revisions\/119"}],"wp:attachment":[{"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.improvely.com\/docs\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}