Swiftpack.co - PerfectlySoft/Perfect-GoogleAnalytics-MeasurementProtocol as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by PerfectlySoft.
PerfectlySoft/Perfect-GoogleAnalytics-MeasurementProtocol 3.1.0
Server side Google Analytics, using Swift / Perfect
⭐️ 2
🕓 5 years ago
linux macOS iOS
.package(url: "https://github.com/PerfectlySoft/Perfect-GoogleAnalytics-MeasurementProtocol.git", from: "3.1.0")

Perfect Google Analytics Measurement Protocol

Perfect logo

Perfect logo Perfect logo Perfect logo Perfect logo

Swift 4.0 Platforms OS X | Linux License Apache Twitter Join the chat at https://gitter.im/PerfectlySoft/Perfect Slack Status GitHub version

Google Analytics Measurement Protocol support for Perfect

This project provides a Swift interface to the Google Analytics Measurement Protocol.

This package builds with Swift Package Manager and is part of the Perfect project.

Ensure you have installed and activated the latest Swift 4 tool chain.

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.

GitHub

link
Stars: 2
Last commit: 5 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Fixing obsolete url.
6 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics