File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 11# swetrix-java
22
3+ ## Usage
4+ ``` java
5+ Swetrix swetrix = Swetrix . builder(" YOUR_PROJECT_ID" )
6+ .withDebugEnabled(true ) // Useful for debugging.
7+ .withAnalyticsDisabled(false ) // For local/dev environments.
8+ .withApiUrl(" https://..." ) // If you have your own self-hosted instance. Omit this to use the default Swetrix API.
9+ .build();
10+
11+ // Or, if you just want an quick instance with defaults, new Swetrix("YOUR_PROJECT_ID");
12+
13+ swetrix. trackPageView(" /" ); // Tracking page views is easy.
14+
15+ swetrix. track(" my_custom_event" , false ); // You can also track custom events.
16+ ```
17+
18+ ## Installation (Maven)
319``` xml
420 <repositories >
521 <repository >
1632 <scope >compile</scope >
1733 </dependency >
1834 </dependencies >
19- ```
35+ ```
You can’t perform that action at this time.
0 commit comments