Categorygithub.com/brandonromano/go-gamp
modulepackage
0.0.0-20180418193921-fd686cc46971
Repository: https://github.com/brandonromano/go-gamp.git
Documentation: pkg.go.dev

# README

gamp GoDoc

Google Analytics Measurement Protocol in Golang

Almost full API implementation, except dynamic parameters(due to swagger 2.0 is not supported it yet) and batch mode.

Example

package main

import (
	"log"
	"context"

	"github.com/AlekSi/pointer"
	gamp "github.com/olebedev/go-gamp"
	"github.com/olebedev/go-gamp/client/gampops"
)

func main() {
	client := gamp.New(context.Background(), "UA-XXXXXXXX-X")
	err := client.Collect(
		gampops.NewCollectParams().
			WithCid(pointer.ToString("42")).
			WithT("event").
			WithEc(pointer.ToString("Category")).
			WithEa(pointer.ToString("Action")),
	)
	if err != nil {
		log.Fatal(err)
	}
}

# Packages

No description provided by the author

# Functions

New returns gamp client.