-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from foomo/v0.11.0
feat: add enable geo resolution
- Loading branch information
Showing
24 changed files
with
296 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package config | ||
|
||
type GoogleAnalyticsGTagJSOverride struct { | ||
// Enable override | ||
Enabled bool `json:"enabled" yaml:"enabled"` | ||
// Client priority | ||
Priority int64 `json:"priority" yaml:"priority"` | ||
// Allow sending items for non ecommerce events | ||
EcommerceItems bool `json:"ecommerceItems" yaml:"ecommerceItems"` | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
pkg/provider/googleanalytics/server/client/googleanalyticsga4.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package client | ||
|
||
import ( | ||
"strconv" | ||
|
||
"google.golang.org/api/tagmanager/v2" | ||
) | ||
|
||
func NewGoogleAnalyticsGA4(name string, enableGeoResolution bool, visitorRegion, measurementID *tagmanager.Variable) *tagmanager.Client { | ||
return &tagmanager.Client{ | ||
Name: name, | ||
Parameter: []*tagmanager.Parameter{ | ||
{ | ||
Key: "activateResponseCompression", | ||
Type: "template", | ||
Value: "true", | ||
}, | ||
{ | ||
Key: "activateGeoResolution", | ||
Type: "boolean", | ||
Value: strconv.FormatBool(enableGeoResolution), | ||
}, | ||
{ | ||
Key: "activateGtagSupport", | ||
Type: "boolean", | ||
Value: "true", | ||
}, | ||
{ | ||
Key: "activateDependencyServing", | ||
Type: "boolean", | ||
Value: "true", | ||
}, | ||
{ | ||
Key: "activateDefaultPaths", | ||
Type: "boolean", | ||
Value: "true", | ||
}, | ||
{ | ||
Key: "region", | ||
Type: "template", | ||
Value: "{{" + visitorRegion.Name + "}}", | ||
}, | ||
{ | ||
Key: "cookieManagement", | ||
Type: "template", | ||
Value: "js", | ||
}, | ||
{ | ||
Key: "gtagMeasurementIds", | ||
Type: "list", | ||
List: []*tagmanager.Parameter{ | ||
{ | ||
Type: "map", | ||
Map: []*tagmanager.Parameter{ | ||
{ | ||
Key: "measurementId", | ||
Type: "template", | ||
Value: "{{" + measurementID.Name + "}}", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
Type: "gaaw_client", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.