cancel
Showing results for 
Search instead for 
Did you mean: 

Can I track when a profile logs in to the website built on Magento?

Can I track when a profile logs in to the website built on Magento?

Hi everyone, 

I am facing a bit of challenge here. I want to exclude people from seeing certain forms in klaviyo based on if someone is logged in on the website from where they can redeem reward points and everything. 

Does magento stores information whenever someone logs in on a website built on Magento?

How can we send that information as a property to klaviyo?

Appreciate any help I can get. 

1 REPLY 1

Re: Can I track when a profile logs in to the website built on Magento?

Hi @askariflowb599 ,

 

If you just want to hide/show forms then JS identify method is fastest.
If you also want event history for analytics (who logged in, when, etc.) then go with the Observer and Klaviyo track event.

 

require(['Magento_Customer/js/customer-data'], function (customerData) {
    var customer = customerData.get('customer');
    if (customer && customer.firstname) {
        // Call Klaviyo JS identify
        
    }
});

Problem Solved? Accept as Solution!

 

Thanks,

Ankit

Ankit Jasani