What is Leadfeeder Identify Call?

Leadfeeder Identify Call is one of the methods that Leadfeeder’s JavaScript API exposes for the web page to call. It allows you to use your existing ways of identifying website visitors within Leadfeeder.

Some examples of existing ways of identifying

  • Visitors logging to a web app (e.g. SaaS tools)

  • Visitors logging in to a webshop/intranet/portal

The benefits of using Leadfeeder Identify Call are many:

  • It improves the company identification that Leadfeeder does for your account.

  • You’ll see identified individuals in Leadfeeder.

  • You can filter leads based on them having attached identified individuals by using. Identified visitors filter type in the Custom feed. However, identified visitors can be set only as "is any" or "is none", not as specifically identified visitors.

Once Leadfeeder Identify Call is triggered, the visitor in question appears on the People tab like following:

Also, the visitor and their company appear on the Companies tab:

The visit details of an individual would look like following:

With Leadfeeder Identify Call it's possible to identify also website visitors that use a home or mobile phone Internet connection.

Once your web app/portal/webshop is aware of the visitor logged in you’d need to call identify() with the visitor’s email address.

Identify() exists under the window.ldfdr -object on the page. Therefore, make sure your web app/portal/webshop has the Leadfeeder tracking script installed.

NOTE: Please note that using this feature requires doing changes to your website code. If you aren't a developer, please ask your website developer to help you further.

Identify() requires the `email` parameter to be present, and you can optionally pass `firstName` and `lastName` too. Below is a full call signature for identify:

email: "email@example.com",
firstName: "first name",
lastName: "last name"

NOTE: When using the Leadfeeder JavaScript API it is good to keep in mind that Leadfeeder Tracker supports multiple trackers on one page. The methods in the JavaScript API are designed so that, by default, the behaviour is applied to all trackers. However, you can call them for specific tracker instances only.

To send identity information from GTM, you can use a custom HTML tag. You naturally need to have the Leadfeeder tracker installed too, either as a custom HTML tag or using the Leadfeeder template from the GTM template gallery. You need to ensure that the firing order is correct, the Leadfeeder tracker tag should always be fired before identify is called.

Example tag configuration:

The above assumes you have a Tag Manager variable called currentUser.email available. There are multiple ways to capture values into variables in GTM: you can take it from some page element (DOM element variable), read a JavaScript variable, or read the value from GTM’s DataLayer.

If you use the DOM element variable you need to define which element from the DOM is the email (the backend must embed the email in the DOM when constructing the webpage for this to work). The DOM element variable will work only if the email is already part of the DOM.

In case the logged-in user’s email address gets retrieved asynchronously (AJAX) from your site’s backend, then you need also to have the following setup:

STEP 1: On every pageview, backend pushes currentUser.email to GTM’s data layer when available and after that triggers an event for “email-loaded”. Check-in your backend that the event is triggered properly to GTM.

STEP 2: GTM has a variable where currentUser.email gets stored from the data layer.

STEP 3: GTM has Trigger, type Custom event, where the event name it listens is “email loaded”.

STEP 4: Finally, the Tag for triggering identify() utilizes the variable and Trigger created above.

To send identity information from a WordPress website, please follow these steps:

STEP 1: Open the footer.php in your theme editor. When in the WordPress dashboard, navigate to Appearance > Theme Editor > Theme Footer (footer.php).

STEP 2: Copy paste the following code right before the </body> closing tag

if ( is_user_logged_in() ) {
$current_user = wp_get_current_user();
$current_email = $current_user->user_email;
$current_first = $current_user->user_firstname;
$current_last = $current_user->user_lastname;
email: "<?=$current_email?>",
firstName: "<?=$current_first?>",
lastName: "<?=$current_last?>"
}, 500);
<?php }?>

STEP 3: Confirm changes by clicking on "Update File".

The following video explains how you'll see logged in users in Leadfeeder when you use Lead Engagement Timeline.

Got questions? Don't hesitate to reach out to our support team via email or live chat for more info!


Did this answer your question?