1 | # Proxima scripts & monitoring utilities
|
2 |
|
3 | ## Intro
|
4 |
|
5 | Proxima is an Open Source analytics platform with strong focus on privacy and security.
|
6 | This _(alias `astron`)_ is the main analytics script of Proxima.
|
7 |
|
8 | ## Monitoring scripts
|
9 |
|
10 | We provide a tracking / monitoring script that you can embed to your website as:
|
11 |
|
12 | ```
|
13 | <script type="module" async defer src="https://example.com/latest.modern.js" data-site="xxx-xxx-xxx"></script>
|
14 | <script nomodule async defer src="https://example.com/latest.js" data-site="xxx-xxx-xxx"></script>
|
15 | <noscript>
|
16 | <img src="https://example.com/noscript.gif" alt="" />
|
17 | </noscript>
|
18 | ```
|
19 |
|
20 | You can embed this snippet to the closing `</body>` tag of your website or application. We handles the rest for you.
|
21 | It works along with SPAs, and literally any tech stack.
|
22 |
|
23 | ## Script options
|
24 |
|
25 | - `data-site`: the Proxima short project code.
|
26 | - `data-autotrack-off`: disables autotracking, usefull when you want to manually track views and events.
|
27 |
|
28 | ## Tracker functions
|
29 |
|
30 | The Proxima tracker exposes some methods that you can use manually for granulated control:
|
31 |
|
32 | `proxima.track(url, [referrer])`
|
33 | Sends a pageview towards the collecting service.
|
34 |
|
35 | `proxima.trackEvent(eventType, [value], [url])`
|
36 | Tracks an event with a custom event type, Proxima has some predefined event types used for detailed analytics.
|