web / useLastSeen
Function: useLastSeen() ​
useLastSeen():
object
Defined in: composables/useLastSeen/useLastSeen.ts:21
Composable for managing the user's recently viewed products (last seen items).
Returns ​
object
An object containing methods to track product views
addLastSeen ​
addLastSeen: (
product) =>void
Parameters ​
product ​
Product
Returns ​
void
Remarks ​
Legal Compliance Hint: Using last seen tracking may require updates to the website's privacy policy. Products are tracked based on the customer's last seen activity and this information is temporarily stored server-side on the session. Consider consulting legal counsel to verify compliance with applicable data protection regulations (e.g., GDPR).
Example ​
ts
const { addLastSeen } = useLastSeen();
addLastSeen(product);