Skip to content
blablapolicjaPublic
forked from olebedev/go-gamp

About

Google Analytics Measurement Protocol in Golang

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

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/blablapolicja/go-gamp"
	"github.com/blablapolicja/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)
	}
}

About

Google Analytics Measurement Protocol in Golang

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

⌂ 换网址