- 0.0.2 and master220.127.116.11.04.2
- 0.0.2 and masteriOSmacOS(Intel)macOS(ARM)LinuxtvOSwatchOS
Google Analytics for Vapor
A Vapor provider for Google Analytics - a pure Swift implementation of Google Analytics Measurement Protocol
Package.swift file, add the following
.package(url: "https://github.com/PoissonBallon/google-analytics-provider.git", from: "0.0.1")
Register the config and the provider to your Application
let config = GoogleAnalyticsConfig(trackingID: "UA-12XXXXX-Y") services.register(config) try services.register(GoogleAnalyticsProvider())
And you are all set. Interacting with the API is quite easy.
let gac = try req.make(GoogleAnalyticsClient.self) gac.send(hit: .event(category: "API", action: "create TODO"))
And you can always check the documentation to see the required parameters for specific API calls.
Google Analytics Provider is available under the MIT license. See the LICENSE file for more info.
Feel free to submit a pull request whether it's a clean up, a new approach to handling things, adding a new part of the API, or even if it's just a typo. All help is welcomed! 😀