customerLoggedIn
Customer tracking
Thanks to this feature Yottly can analyze the behavior of webpage visitor from the first moment he or she log in.
The feature allows Yottly to send customers personalized newsletters or customize online banners.
diffAnalytics.customerLoggedIn(customerId)
- customerId – string
- It is customers ID which is compatible with Yottly customer feed. The ID helps Yottly to pair the unknown customer with the specific one from the database – customers feed.
- Call this method whenever the customer is logged in (not only for the first time of logging).
- Do not call this method if the customer is not logged in. It would lead to unexpected behavior. In particular do not call this method with empty argument or default value such as “undefined” etc.
Full example:
Customer with ID “1234” is logged in.
diffAnalytics.customerLoggedIn("1234")
Validate your implementation
Go to the browser console, select Network and one of the save-action requests should contain customerId in the attachment after every pageload of logged in customer. Please pay attention to correct spelling. The customerId must be in the same format as CUSTOMER_ID in the Customer feed.