How to identify user with API?

Created by LiRou C, Modified on Tue, 14 May 2024 at 08:01 AM by Donald Ng

Identifying users can provide more context around your data throughout your website. It helps you to have more comprehensive views of your target audiences.



Identify users API


This requires you or your developer to propagate the information from your service. This method is called from the browser of your visitor, therefore any information you want to associate with your visitor needs to be part of your webpage. Besides, Mida will automatically capture basic user info such as pageview/session counts and UTM tags.

To provide user info as an object with all information as key and value. You can add any property key with the user such as plan_id, gender, age, or anything at all.


// Make sure Mida tracking script is present on the page
mida.identify({
    "id": 123,
    "name": "John Doe",
    "email": "john@example.com",
    "company": "Example Company",
    "custom_property_1": "Any property here",
    "custom_property_2": "Any property here"
});
JavaScript
JavaScript

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article