|
1 | 1 | <!-- |
2 | | - ~ Licensed to the Apache Software Foundation (ASF) under one |
3 | | - ~ or more contributor license agreements. See the NOTICE file |
4 | | - ~ distributed with this work for additional information |
5 | | - ~ regarding copyright ownership. The ASF licenses this file |
6 | | - ~ to you under the Apache License, Version 2.0 (the |
7 | | - ~ "License"); you may not use this file except in compliance |
8 | | - ~ with the License. You may obtain a copy of the License at |
9 | | - ~ |
10 | | - ~ http://www.apache.org/licenses/LICENSE-2.0 |
11 | | - ~ |
12 | | - ~ Unless required by applicable law or agreed to in writing, |
13 | | - ~ software distributed under the License is distributed on an |
14 | | - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
15 | | - ~ KIND, either express or implied. See the License for the |
16 | | - ~ specific language governing permissions and limitations |
17 | | - ~ under the License. |
| 2 | + Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + or more contributor license agreements. See the NOTICE file |
| 4 | + distributed with this work for additional information |
| 5 | + regarding copyright ownership. The ASF licenses this file |
| 6 | + to you under the Apache License, Version 2.0 (the "License"); |
| 7 | + you may not use this file except in compliance with the License. |
| 8 | + You may obtain a copy of the License at |
| 9 | +
|
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | + Unless required by applicable law or agreed to in writing, |
| 13 | + software distributed under the License is distributed on an |
| 14 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, |
| 15 | + either express or implied. See the License for the specific |
| 16 | + language governing permissions and limitations under the License. |
18 | 17 | --> |
19 | 18 |
|
20 | | -This is a [Plasmo extension](https://docs.plasmo.com/) project bootstrapped with [`plasmo init`](https://www.npmjs.com/package/plasmo). |
| 19 | +# Flagon UserALE Browser Extension |
| 20 | + |
| 21 | +This package provides a browser extension for [Flagon UserALE](https://flagon.apache.org/userale/), enabling effortless, no-code instrumentation of websites. It captures user interactions and sends behavioral logs to a logging endpoint. |
| 22 | + |
| 23 | +The extension is built with [Plasmo](https://docs.plasmo.com/) and supports modern browser environments like Chrome and Firefox. |
| 24 | + |
| 25 | +--- |
21 | 26 |
|
22 | | -## Getting Started |
| 27 | +## Features |
23 | 28 |
|
24 | | -First, run the development server: |
| 29 | +✅ Passive user interaction logging |
| 30 | +✅ No code changes required on instrumented pages |
| 31 | +✅ Configurable via extension options (logging endpoint, user ID, tool metadata) |
| 32 | +✅ Supports local development and custom deployments |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +## Getting Started (Development) |
| 37 | + |
| 38 | +1. Install dependencies: |
25 | 39 |
|
26 | 40 | ```bash |
27 | | -pnpm dev |
28 | | -# or |
29 | | -npm run dev |
| 41 | +pnpm install |
30 | 42 | ``` |
31 | 43 |
|
32 | | -Open your browser and load the appropriate development build. For example, if you are developing for the chrome browser, using manifest v3, use: `build/chrome-mv3-dev`. |
| 44 | +2. Start the development build: |
33 | 45 |
|
34 | | -You can start editing the popup by modifying `popup.tsx`. It should auto-update as you make changes. To add an options page, simply add a `options.tsx` file to the root of the project, with a react component default exported. Likewise to add a content page, add a `content.ts` file to the root of the project, importing some module and do some logic, then reload the extension on your browser. |
| 46 | +```bash |
| 47 | +pnpm dev |
| 48 | +``` |
35 | 49 |
|
36 | | -For further guidance, [visit our Documentation](https://docs.plasmo.com/) |
| 50 | +3. Load the extension in your browser: |
| 51 | + - **Chrome**: Visit `chrome://extensions/`, enable Developer Mode, click "Load unpacked", and select the `build/chrome-mv3-dev/` directory. |
| 52 | + - **Firefox**: Visit `about:debugging`, "This Firefox", "Load Temporary Add-on", and select the `manifest.json` file in `build/firefox-mv3-dev/`. |
37 | 53 |
|
38 | | -## Making production build |
| 54 | +--- |
39 | 55 |
|
40 | | -Run the following: |
| 56 | +## Building for Production |
| 57 | + |
| 58 | +To create a production build: |
41 | 59 |
|
42 | 60 | ```bash |
43 | 61 | pnpm build |
44 | | -# or |
45 | | -npm run build |
46 | 62 | ``` |
47 | 63 |
|
48 | | -This should create a production bundle for your extension, ready to be zipped and published to the stores. |
| 64 | +This outputs a zipped production bundle. |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## Extension Options |
| 69 | + |
| 70 | +After installing the extension, click the icon in your browser toolbar to open the **Options** page. From here you can configure: |
| 71 | +- **Logging Endpoint** – Where logs will be sent |
| 72 | +- **URL allowlist** – A regex of URL's to allow logging on |
| 73 | +- **OAuth Credentials** – Details of an OAuth login to authenticate with the logging endpoint. |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +## Resources |
49 | 78 |
|
50 | | -## Submit to the webstores |
| 79 | +- 📚 [UserALE Documentation](https://flagon.apache.org/userale/) |
51 | 80 |
|
52 | | -The easiest way to deploy your Plasmo extension is to use the built-in [bpp](https://bpp.browser.market) GitHub action. Prior to using this action however, make sure to build your extension and upload the first version to the store to establish the basic credentials. Then, simply follow [this setup instruction](https://docs.plasmo.com/framework/workflows/submit) and you should be on your way for automated submission! |
|
0 commit comments