perfectlysoft/perfect-googleanalytics-measurementprotocol
Google Analytics Measurement Protocol support for Perfect
Example usage:
PerfectGAMeasurementProtocol.propertyid = "UA-XXXXXXXX-X"
let gaex = PerfectGAEvent()
gaex.user.uid = "donkey"
gaex.user.cid = "kong"
gaex.session.ua = "aua"
gaex.traffic.ci = "ci"
gaex.system.fl = "x"
gaex.hit.ni = 2
do {
let str = try gaex.generate()
print(str)
let resp = gaex.makeRequest(useragent: "TestingAPI1.0", body: str)
print(resp)
} catch {
print("\(error)")
}
API Documentation
For full API documentation please visit https://www.perfect.org/docs/api-Perfect-GoogleAnalytics-MeasurementProtocol.html
Building
Add this project as a dependency in your Package.swift file.
.Package(url: "https://github.com/PerfectlySoft/Perfect-GoogleAnalytics-MeasurementProtocol.git", majorVersion: 3)Further Information
For more information on the Perfect project, please visit perfect.org.
Package Metadata
Repository: perfectlysoft/perfect-googleanalytics-measurementprotocol
Default branch: master
README: README.md