> 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](https://docs.ingestlabs.com/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
