File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
posthog-samples/posthog-java-sample/src/main/java/com/posthog/java/sample Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 55import com .posthog .server .PostHogConfig ;
66import com .posthog .server .PostHogFeatureFlagOptions ;
77import com .posthog .server .PostHogInterface ;
8-
8+ import com . posthog . server . PostHogSendFeatureFlagOptions ;
99import java .util .HashMap ;
1010
1111/**
@@ -42,6 +42,20 @@ public static void main(String[] args) {
4242 .personProperty ("email" , "example@example.com" )
4343 .build ());
4444
45+ postHog .capture (
46+ "distinct-id" ,
47+ "file_uploaded" ,
48+ PostHogCaptureOptions
49+ .builder ()
50+ .property ("file_name" , "document.pdf" )
51+ .property ("file_size" , 123456 )
52+ .sendFeatureFlags (PostHogSendFeatureFlagOptions
53+ .builder ()
54+ .personProperty ("email" , "example@example.com" )
55+ .onlyEvaluateLocally (true )
56+ .build ())
57+ .build ());
58+
4559 System .out .println ("File previews enabled: " + hasFilePreview );
4660
4761 postHog .flush ();
You can’t perform that action at this time.
0 commit comments