gtm_tags_update {googleTagManageR} | R 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
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)
[Package googleTagManageR version 0.2.0 Index]