> For the complete documentation index, see [llms.txt](https://docs.ingestlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ingestlabs.com/implementation/react-native-sdk/tracking-events/login.md).

# Login

Copy

```
MagicPixel.setCustomerInfo({
    phone_number: '<phone number>',     // mandatory
    country_code: 1, // mandatory
    first_name: '<first name if available>', // full name split by space and part[0], optional
    last_name: '<last name if available>', // full name split by space and part[1], optional
    city: '<lower case city name>', // lower case, no space, optional
    state: '<lower case no space state name>', // lower case, no space, optional
    country: 'in', // hardcoded to in
});
```

When the user Login and Sign Up page opens, fire the following event

Copy

```
MagicPixel.recordEvent('mp_login', {
    method: 'phone',
    ev_source: 'gtm',
    is_existing: 'Y' // 'Y' for an existing user and 'N' for a new user
});
```

[PreviousPage Load](/implementation/react-native-sdk/tracking-events/page-load.md) [NextEcommerce Events](broken://pages/660af312d050fa6f3f93b729df002af4c9c730f3)

Last updated 6 minutes ago


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ingestlabs.com/implementation/react-native-sdk/tracking-events/login.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
