```swift import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID let analytics = Analytics(client) let result = try await analytics.createEvent( propertyId: "", name: "", url: "https://example.com", domain: "", // optional referrer: "", // optional screenWidth: 0, // optional sessionHash: "", // optional scrollDepth: 0, // optional engagementTime: 0, // optional props: [], // optional userId: "", // optional ip: "", // optional userAgent: "", // optional interactive: false // optional ) ```