# Client-Side Implementation

The general implementation process consists of the following stages (the process is described in more detail in the documentation by the links below):

1. Script installation. [1. Gravity Field Script](/lang/en/implementation/client-side-integration/1.-gravity-field-script.md)
2. Context setup. [2. Page Context](/lang/en/implementation/client-side-integration/2.-page-context.md)\
   Context markup is a message to the platform about which page the user is currently on.
3. Setting up events for key metrics. [3. Events](/lang/en/implementation/client-side-integration/3.-events.md)

   For e-commerce "add to cart" and "purchase" events are mandatory. For properties that do not sell products, within the framework of the same events, other key metrics can be passed to the platform.
4. Product feed creation. [4. Feed - General Requirements and Additional Parameters](/lang/en/implementation/client-side-integration/4.-product-feed.md)

   The feed should contain information about all the products and services the company provides. The feed is used for:

   * product recommendations,
   * user interests calculations (user affinity),
   * displaying Social Proof,
   * and in may other use cases.
5. Ensuring seamless user identification regardless of the limitations of the browser used (cloning third-party cookies). [5. Cookies cloning with front-end implementation](/lang/en/implementation/client-side-integration/5.-cookies.md)
6. Configuring SPA events (similar to page changes on non-SPA websites). [Implementation on SPA-enabled sites](/lang/en/implementation/client-side-integration/spa.md)


---

# Agent Instructions: 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:

```
GET https://developer.gravityfield.ai/lang/en/implementation/client-side-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
