| gtm_tags_update | R Documentation |
This takes a tag resource and overwrites the existing tag in GTM
gtm_tags_update(account_id, container_id, workspace_id, tag_id, tag_object)
account_id |
Account Id |
container_id |
Container Id |
workspace_id |
Workspace Id |
tag_id |
Tag Id |
tag_object |
Tag Object |
Other tag functions:
gtm_tags_create(),
gtm_tags_delete(),
gtm_tags_get(),
gtm_tags_list(),
gtm_tags_revert()
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.