Out of the box, Tend will automatically identify website visitors as they enter their email into a web form. However, there may be times where you need more control of the website visitors Tend identifies. In these cases, using TendID may be appropriate choice.
These instructions walk you through installing TendID onto your site. It takes just a few minutes to add the code snippet to your app or website.
If you haven't already, run through the typical Tend Install. Then copy and paste the code snippet below, before the
tag on every page where you want to utilize TendID. The code snippet should appear above the Tend tracking script.
<script>
window.tendID = {
email: "<?php echo $current_visitor->email ?>", //required
firstName: "<?php echo $current_visitor->firstName ?>", //optional
lastName: "<?php echo $current_visitor->lastName ?>" //optional
};
</script>
<script>
window.tendID = {
email: "<%= current_visitor.email %>", //required
firstName: "<%= current_visitor.firstName %>", //optional
lastName: "<%= current_visitor.lastName %>" //optional
};
</script>
<script>
window.tendID = {
email: "{{ request.user.email }}", //required
firstName: "{{ request.user.first_name }}", //optional
lastName: "{{ request.user.last_name }}" //optional
};
</script>
<script>
window.tendID = {
email: "{{ checkout.email }}"
};
</script>
Field | Type | Description |
---|---|---|
firstName | string | The visitor's last name |
lastName | string | The visitor's last name |
string | The visitor's email | |
company | string | The visitor's company |
title | string | The visitor's title |
website | string | The visitor's website |
address | string | The visitor's address |
city | string | The visitor's city |
state | string | The visitor's state |
zip | string | The visitor's postal code |
country | string | The visitor's country |
bio | string | The visitor's bio |
custom_field | string | A value for the visitor's custom field. Use the custom field id, provided through the dashboard. |