v1

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode added in v0.0.7

func Decode(values url.Values, v interface{}) error

Decode converts a URL's values back into the target structure.

func Encode added in v0.0.2

func Encode(payload *gatypes.Payload) (string, error)

Encode accepts an analytics payload and encodes it to a URL

func Values added in v0.0.2

func Values(payload *gatypes.Payload) (url.Values, error)

Values accepts an analytics payload and encodes it to a query string values

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client encapsulates communication with the Google Analytics API.

func NewClient

func NewClient(trackingID, userAgent string) *Client

NewClient creates a client to emit information to Google Analytics

func (*Client) SendGet added in v0.0.2

func (c *Client) SendGet(payload *gatypes.Payload) error

SendGet will send the provided payload as a GET request.

func (*Client) SendPost

func (c *Client) SendPost(payload *gatypes.Payload) error

SendPost will send the provided payload as a POST request.

type Decoder added in v0.0.7

type Decoder interface {
	DecodeValues(key string, v *url.Values) error
}

Decoder provides an interface for decoding values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL