customer support agent

High-quality customer support is crucial for any business. It helps you stand out from the competition and establish yourself as a trusted company.

The Login as Customer app takes customer support to a whole new level. It allows you to log in as a customer in Shopify and provide assistance within minutes.

Still, in some cases, you might need to track staff members who logged into customer accounts for safety of other reasons. Or, perhaps even display custom content on frontend for admin users specifically.

There are a few options for that, but let's start with the basics.

Track Admin Users in Recent Logins

Regardless of the method you use to log into a customer account all recent logins are stored in the Recent Logins tab. Just navigate to Magefan Login as Customer > Recent Logins to see a list of customer accounts admins recently logged into.

manage recent logins in shopify

Track Admin Users in Customer Account

The other option is available for Shopify Plus users only. It allows you to track admin users who logged into customer accounts directly in the Shopify customer account.

For that, you need to enable the Login Log in the app settings. Go to Apps > Magefan Login as Customer > Configuration and enable a corresponding option and paste the Admin Api Access Token.

login log shopify customers

This will enable admin user tracking within customer accounts.

track admin users in customer accounts shopify

Track Admin Users Logged In on Frontend

If you want your admin users to place orders on behalf of customers in Shopify, you can adjust the purchasing journey for them. One way to do that is by displaying custom fields or collections for admin users who logged in as customers on the frontend.

But to achieve that you need to track who's logged in: admin user or a customer. We do that using the specific cookie value for the admin user — mf_lac_logged

Use the following function to check if this cookie value it set:

function isMfLacUser() {
        let name = 'mf_lac_logged=';
        let decodedCookie = decodeURIComponent(document.cookie);
        let ca = decodedCookie.split(';');
        for(let i = 0; i <ca.length; i++) {
            let c = ca[i];
            while (c.charAt(0) === ' ') {
                c = c.substring(1);
            };
            if (c.indexOf(name) === 0) {
                return c.substring(name.length, c.length);
            }
        };
        return '';
    }

When the mf_lac_logged cookie value returns you'll know it's the staff member who is logged into the customer account. Then you can display any custom content for them to improve the purchasing journey.

But that's not it.

You can also use the Login as Customer API to track orders placed by admins in the order view page and place orders for customers from other CRMs or helpdesks.