mirror of
https://github.com/foomo/sesamy-cli.git
synced 2025-10-16 12:35:36 +00:00
Merge pull request #96 from foomo/v0.15.0
feat: add server container url
This commit is contained in:
commit
6f20c9bf96
@ -113,6 +113,8 @@ googleTag:
|
|||||||
tagId: G-PZ5ELRCR31
|
tagId: G-PZ5ELRCR31
|
||||||
# Whether a page_view should be sent on initial load
|
# Whether a page_view should be sent on initial load
|
||||||
sendPageView: true
|
sendPageView: true
|
||||||
|
# Optional custom server container url
|
||||||
|
serverContainerUrl: ''
|
||||||
# TypeScript settings
|
# TypeScript settings
|
||||||
typeScript:
|
typeScript:
|
||||||
# Target directory for generate files
|
# Target directory for generate files
|
||||||
|
|||||||
@ -5,6 +5,8 @@ type GoogleTag struct {
|
|||||||
TagID string `json:"tagId" yaml:"tagId"`
|
TagID string `json:"tagId" yaml:"tagId"`
|
||||||
// Whether a page_view should be sent on initial load
|
// Whether a page_view should be sent on initial load
|
||||||
SendPageView bool `json:"sendPageView" yaml:"sendPageView"`
|
SendPageView bool `json:"sendPageView" yaml:"sendPageView"`
|
||||||
|
// Optional custom server container url
|
||||||
|
ServerContainerURL string `json:"serverContainerUrl" yaml:"serverContainerUrl"`
|
||||||
// Data layer variables to be added to the event settings
|
// Data layer variables to be added to the event settings
|
||||||
DataLayerVariables map[string]string `json:"dataLayerVariables" yaml:"dataLayerVariables"`
|
DataLayerVariables map[string]string `json:"dataLayerVariables" yaml:"dataLayerVariables"`
|
||||||
// TypeScript settings
|
// TypeScript settings
|
||||||
|
|||||||
@ -26,6 +26,9 @@ func Web(tm *tagmanager.TagManager, cfg config.GoogleTag) error {
|
|||||||
if !cfg.SendPageView {
|
if !cfg.SendPageView {
|
||||||
configSettings["send_page_view"] = "false"
|
configSettings["send_page_view"] = "false"
|
||||||
}
|
}
|
||||||
|
if cfg.ServerContainerURL != "" {
|
||||||
|
configSettings["server_container_url"] = cfg.ServerContainerURL
|
||||||
|
}
|
||||||
|
|
||||||
eventSettings := map[string]*api.Variable{}
|
eventSettings := map[string]*api.Variable{}
|
||||||
for k, v := range cfg.DataLayerVariables {
|
for k, v := range cfg.DataLayerVariables {
|
||||||
|
|||||||
@ -425,6 +425,10 @@
|
|||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Whether a page_view should be sent on initial load"
|
"description": "Whether a page_view should be sent on initial load"
|
||||||
},
|
},
|
||||||
|
"serverContainerUrl": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Optional custom server container url"
|
||||||
|
},
|
||||||
"dataLayerVariables": {
|
"dataLayerVariables": {
|
||||||
"$ref": "#/$defs/map[string]string",
|
"$ref": "#/$defs/map[string]string",
|
||||||
"description": "Data layer variables to be added to the event settings"
|
"description": "Data layer variables to be added to the event settings"
|
||||||
|
|||||||
@ -61,6 +61,8 @@ googleTag:
|
|||||||
tagId: G-PZ5ELRCR31
|
tagId: G-PZ5ELRCR31
|
||||||
# Whether a page_view should be sent on initial load
|
# Whether a page_view should be sent on initial load
|
||||||
sendPageView: true
|
sendPageView: true
|
||||||
|
# Optional custom server container url
|
||||||
|
serverContainerUrl: ''
|
||||||
# Data layer variables to be added to the event settings
|
# Data layer variables to be added to the event settings
|
||||||
dataLayerVariables:
|
dataLayerVariables:
|
||||||
emarsys_page_view_id: emarsys.page_view_id
|
emarsys_page_view_id: emarsys.page_view_id
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user