# README
Google Analytics segment definition Parser and Serializer
Example
package main
import (
"fmt"
"github.com/wacul/gasegment"
)
func main() {
// parse
segments, err := gasegment.Parse("users::condition::ga:pagePath==/abc")
if err != nil {
panic(err)
}
// modify
segments[0].Scope = gasegment.SessionScope
segments[0].Condition.AndExpression[0][0].Operator = gasegment.NotEqual
segments[0].Condition.AndExpression[0][0].Value = "cde"
// stringify
fmt.Println(segments.DefString())
}
Commandline
$ go get -v github.com/wacul/gasegment/cmd/gasegment
$ echo "sessions::condition::ga:medium==referral" | gasegment
{
"name": "-",
"sessionSegment": {
"segmentFilters": [
{
"simpleSegment": {
"orFiltersForSegment": [
{
"segmentFilterClauses": [
{
"dimensionFilter": {
"dimensionName": "ga:medium",
"expressions": [
"referral"
],
"operator": "EXACT"
}
}
]
}
]
}
}
]
}
}
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author