All Collections
Behavioral tracking & remarketing
How to manually track users on your website
How to manually track users on your website
Marek Szwed avatar
Written by Marek Szwed
Updated over a week ago

Ecomail automatically tracks user behavior from the moment it is able to pair

email address with activity on the site - this is usually after users first click through to your site via a newsletter with tagged links or from an automated email, where you can turn on automatic tagging directly in the email settings. At this point, the tracking code on the site remembers them and can identify the user the next time they visit, sending individual events directly to the contact's profile in Ecomail.

If you want to track users before they click through your newsletter, and you know their email (for example, because the user is logged into your website), you can adapt the behaviour of our tracking code to this by adding the following feature:

Add this function before the trackPageView function:

window.ecotrack('setUserId', '');

This will allow the tracking code to remember it for future visits. If the user has already been tracked by a click-through and logs in under a different email, the information in the cookie will be overwritten by the manual behavior.

Did this answer your question?