gtm_triggers_create | R Documentation |
This takes a trigger resource and creates a new trigger in GTM.
gtm_triggers_create(account_id, container_id, workspace_id, trigger_object)
account_id |
Account Id |
container_id |
Container Id |
workspace_id |
Workspace Id |
trigger_object |
Trigger Object |
Other trigger functions:
gtm_triggers_delete()
,
gtm_triggers_get()
,
gtm_triggers_list()
,
gtm_triggers_revert()
,
gtm_triggers_update()
## Not run: accountId <- 1234567 containerId <- 7654321 workspaceId <- 3 trigger <- list( name = 'Demo Trigger', type = 'pageview' ) newTrigger <- gtm_triggers_create(accountId, containerId, workspaceId, trigger) trigger2 <- list( name = 'More Complex Trigger', type = 'pageview', filter = list( list( type = 'contains', parameter = list( list( type='template', key = 'arg0', value='{{Lookup Table}}' ), list( type='template', key = 'arg1', value='Lookup Value' ) ) ) ) ) newTrigger2 <- gtm_triggers_create(accountId, containerId, workspaceId, trigger2) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.