We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1eb8557 commit 67abd9dCopy full SHA for 67abd9d
1 file changed
README.md
@@ -1,5 +1,21 @@
1
# swetrix-java
2
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)
19
```xml
20
<repositories>
21
<repository>
@@ -16,4 +32,4 @@
32
<scope>compile</scope>
33
</dependency>
34
</dependencies>
-```
35
0 commit comments