gtm_tags_update: Update an existing tag

View source: R/tags.R

gtm_tags_updateR Documentation

Update an existing tag

Description

This takes a tag resource and overwrites the existing tag in GTM

Usage

gtm_tags_update(account_id, container_id, workspace_id, tag_id, tag_object)

Arguments

account_id

Account Id

container_id

Container Id

workspace_id

Workspace Id

tag_id

Tag Id

tag_object

Tag Object

See Also

https://developers.google.com/tag-platform/tag-manager/api/v2/reference/accounts/containers/workspaces/tags/update

Other tag functions: gtm_tags_create(), gtm_tags_delete(), gtm_tags_get(), gtm_tags_list(), gtm_tags_revert()

Examples

## Not run: 

accountId <- 1234567
containerId <- 7654321
workspaceId <- 5
tagId <- 11

tag <- list(
  name = "Example DataLayer Push",
  type = "html",
  tagFiringOption = "oncePerEvent",
  parameter = list(
    list(
      type = "template",
      key = "html",
      value = "<script>\n   window.dataLayer=window.dataLayer||[];\n   
               window.dataLayer.push({\"event\": \"demoEvent\"});\n
               </script>"
    ),
    list(
      type = "boolean",
      key = "supportDocumentWrite",
      value = "false"
    )
  ),
  firingTriggerId = 20,
  tagFiringOption = "oncePerPage"
)

updatedTag <- gtm_tags_update(accountId, containerId, workspaceId, tagId, tag)

## End(Not run)


googleTagManageR documentation built on April 17, 2022, 1:05 a.m.