Server side Google Analytics, using Swift / Perfect

What's New

Fixing obsolete url.


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 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" = "aua" = "ci"
gaex.system.fl = "x" = 2

do {
	let str = try gaex.generate()
	let resp = gaex.makeRequest(useragent: "TestingAPI1.0", body: str)
} catch {

API Documentation

For full API documentation please visit


Add this project as a dependency in your Package.swift file.

.Package(url: "", majorVersion: 3)


We are transitioning to using JIRA for all bugs and support related issues, therefore the GitHub issues has been disabled.

If you find a mistake, bug, or any other helpful suggestion you'd like to make on the docs please head over to and raise it.

A comprehensive list of open issues can be found at

Further Information

For more information on the Perfect project, please visit


  • Swift Tools 3.1.0
View More Packages from this Author


Last updated: Wed Feb 01 2023 23:37:40 GMT-0500 (GMT-05:00)