> For the complete documentation index, see [llms.txt](https://lifi-chrome-tracker.gitbook.io/lifi-chrome-tracker-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lifi-chrome-tracker.gitbook.io/lifi-chrome-tracker-docs/overview/how-it-works.md).

# How It Works

## Core Principles of LiFi

LiFi is built on five foundational principles that define how it works and what it stands for. These principles are not just technical choices, but intentional decisions that prioritize the user's privacy, control, and experience. Understanding them will help you see why LiFi is different from traditional browser tracking or analytics tools.

### Privacy First

**What it means**\
LiFi does not send your data to any external servers. Everything the extension collects stays on your device.

**Why it matters**\
Most web services and browser extensions send your data to the cloud where it can be analyzed, stored, or even sold. This puts your personal browsing habits at risk. LiFi avoids this entirely by using local storage only.

**How it works in LiFi**

* Uses Chrome's local storage API to keep everything on your device
* No remote syncing or background uploads
* You remain the sole owner of your data
* You can inspect, export, or delete your data at any time

### User Control

**What it means**\
You are always in charge of what data is collected and when. Tracking is never forced or hidden.

**Why it matters**\
With most tracking tools, you do not get a say. They collect everything by default. LiFi respects your boundaries and preferences, giving you clear tools to manage what is tracked.

**How it works in LiFi**

* You can turn tracking on or off at any time
* Data can be deleted with one click
* Nothing is hidden from you in the interface

### Transparency

**What it means**\
Everything that LiFi tracks is visible and explainable. You know exactly what data is collected and how it is used.

**Why it matters**\
Most tools collect data in the background without clearly telling you what they are doing. This creates a gap between what users think is happening and what actually happens. LiFi closes that gap.

**How it works in LiFi**

* All tracked data is displayed in the analytics dashboard
* Advanced users can inspect the raw data in JSON format
* The privacy dashboard shows which cookies are being set
* AI summaries include explanations of how insights are generated

### AI Enhanced

**What it means**\
LiFi uses artificial intelligence to give you meaningful insights into your browsing behavior. It does not just show you data but helps you understand it.

**Why it matters**\
Collecting data is not enough. You need to be able to act on it. AI helps summarize your patterns, identify habits, and suggest ways to improve productivity and privacy.

**How it works in LiFi**

* Uses Google Gemini API to generate summaries and scores
* Insights include productivity scores, peak browsing hours, and interest categories
* All prompts are generated from local data
* AI is only used when you allow it and can be turned off at any time
* If AI is unavailable, LiFi switches to rule-based fallback summaries

### Local Storage Only

**What it means**\
All your data stays in your browser. Nothing is stored online unless you choose to export it manually.

**Why it matters**\
Online storage increases the risk of breaches and misuse. With local storage, you keep full ownership of your information and reduce the risk of data leaks or exposure.

**How it works in LiFi**

* No user accounts are required to use the extension
* No cloud-based syncing or storage is built into the system
* All events are stored in structured local keys using Chrome’s storage API
* You can export your data as a downloadable JSON file
* Cookies, search queries, time spent, and other metrics are saved safely on your device

### Summary

LiFi gives you all the benefits of a powerful analytics system without compromising your privacy. By respecting your control, keeping everything transparent, using local-only storage, and applying AI responsibly, it helps you better understand your online behavior and use your time more effectively.

These principles guide every feature in LiFi and ensure that your data works for you, not against you.


---

# 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://lifi-chrome-tracker.gitbook.io/lifi-chrome-tracker-docs/overview/how-it-works.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.
