fix: add google tag

This commit is contained in:
Kevin Franklin Kim 2024-03-13 09:29:10 +01:00
parent 1d13587232
commit 6096275242
No known key found for this signature in database
3 changed files with 20 additions and 2 deletions

View File

@ -64,7 +64,7 @@ var tagmanagerWebCmd = &cobra.Command{
return err
}
logger.Info("- Variable:", logger.Args("name", "server-container-url"))
logger.Info("- Tag:", logger.Args("name", "Google Tag"))
if _, err = c.UpsertGoogleTagWebTag("Google Tag", measurementID, googleTagSettings); err != nil {
return err
}

View File

@ -564,7 +564,7 @@ func (c *Client) UpsertGoogleTagSettingsVariable(name string, variables map[stri
List: list,
},
},
Type: "gtes",
Type: "gtcs",
}
return c.UpsertVariable(obj)

View File

@ -159,6 +159,24 @@ func TestNewClient_Web(t *testing.T) {
})
}
{ // --- Built-In Variables ---
t.Run("list built-in variables", func(t *testing.T) {
cmd := c.Service().Accounts.Containers.Workspaces.BuiltInVariables.List(c.WorkspacePath())
if r, err := cmd.Do(); assert.NoError(t, err) {
dump(t, r)
}
})
}
{ // --- Built-In Variables ---
t.Run("list gtag config", func(t *testing.T) {
cmd := c.Service().Accounts.Containers.Workspaces.GtagConfig.List(c.WorkspacePath())
if r, err := cmd.Do(); assert.NoError(t, err) {
dump(t, r)
}
})
}
{ // --- Variables ---
name := "ga4-measurement-id"
t.Run("list variables", func(t *testing.T) {