The identify logic was filtering the userId from its usable data before it could render it into the userId field of its call. This meant that we weren't reliably rendering the userId in the one identify call we were firing on registration. That's been fixed.
Call identify on every page when the user is logged in, not just on registration
Allow store owner to optionally flush a.js user() object with analytics.reset() after customers log out (defaults to false)
Allow store owner to optionally pass product properties which they'd like to omit from their product info dictionary (the same one used to populate Completed Order, Viewed Product, Added Product, and Removed Product properties). This allows them to blacklist fields from being rendered in analytics calls.
Strips all null K/V pairs from product properties by default.
Added Product and Removed Product only used to pass sku; now they pass the full product info dictionary
Customer log out used to trigger two Logged Out events due to a redundant logout mechanism that would attempt to grab the customers id for continued use after logout. That mechanism has been removed. If a user opts not to flush (# 4 above), then analytics.js will handle caching and use of the resilient userId. If they do flush, then they will deliberately not have that userId after logout.
Given the enormity of these changes and in particular that we now strip null product properties by default (thus potentially changing data collection for some users) I am going to release and publish this to connect as 2.0.0 and mark stability as beta.
Fixes and Improvements
userId
field of its call. This meant that we weren't reliably rendering the userId in the one identify call we were firing on registration. That's been fixed.user()
object withanalytics.reset()
after customers log out (defaults to false)Completed Order
,Viewed Product
,Added Product
, andRemoved Product
properties). This allows them to blacklist fields from being rendered in analytics calls.null
K/V pairs from product properties by default.Added Product
andRemoved Product
only used to passsku
; now they pass the full product info dictionaryLogged Out
events due to a redundant logout mechanism that would attempt to grab the customers id for continued use after logout. That mechanism has been removed. If a user opts not to flush (# 4 above), then analytics.js will handle caching and use of the resilientuserId
. If they do flush, then they will deliberately not have thatuserId
after logout.Given the enormity of these changes and in particular that we now strip
null
product properties by default (thus potentially changing data collection for some users) I am going to release and publish this to connect as2.0.0
and mark stability asbeta
.