Using the Visitor Labeling Code

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 — by registering, purchasing or signing in.

From your project’s settings page, click on the Get This Project’s Website Code button to retrieve the Website Code, Conversion Code and Visitor Labeling Code for your site.

Use of this code is optional and requires custom programming.

To add the code to your website:

  1. Click the Copy to Clipboard button to copy the code to your computer’s clipboard. Alternatively, highlight the code with your mouse and press CTRL+C or CMD+C.

  2. Paste the code into a webpage visitors see after identifying themselves.

    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.

    Include the Visitor Labeling Code underneath the Website Code you’ve already added to your page. Example:

    <!-- Website Code -->
    <script type="text/javascript">
    <script type="text/javascript">
    var im_domain = 'demo';
    var im_project_id = 1;
    (function(e,t){window._improvely=[];var n=e.getElementsByTagName("script")[0];var r=e.createElement("script");r.type="text/javascript";r.src="https://"+im_domain+".iljmp.com/improvely.js";r.async=true;n.parentNode.insertBefore(r,n);if(typeof t.init=="undefined"){t.init=function(e,t){window._improvely.push(["init",e,t])};t.goal=function(e){window._improvely.push(["goal",e])};t.conversion=function(e){window._improvely.push(["conversion",e])};t.label=function(e){window._improvely.push(["label",e])}}window.improvely=t;t.init(im_domain,im_project_id)})(document,window.improvely||[])
    </script>
    
    <!-- Visitor Labeling Code -->
    <script type="text/javascript">
    improvely.label('example@example-email.com');
    </script>
  3. Add your code to output the visitor’s e-mail address.

    For example, improvely.label('<?php echo $email; ?>');

    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’s e-mail address. This is not code that we provide. It is code that your website developer must write.

    This information will appear at the top of the visitor’s profile in your account.

Warning: 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. Never hard-code a static identifier like “anonymous” or “guest”.


More from this category
Conversion tracking and click fraud monitoring for all your marketing.   Start a Free Trial