| gtm_variables_update | R Documentation | 
This takes a variable resource and overwrites the existing variable in GTM
gtm_variables_update( account_id, container_id, workspace_id, variable_id, variable_object )
account_id | 
 Account Id  | 
container_id | 
 Container Id  | 
workspace_id | 
 Workspace Id  | 
variable_id | 
 Variable Id  | 
variable_object | 
 Variable Object  | 
Other variable functions: 
gtm_variables_create(),
gtm_variables_delete(),
gtm_variables_get(),
gtm_variables_list(),
gtm_variables_revert()
## Not run: 
accountId <- 1234567
containerId <- 7654321
workspaceId <- 3
updatedVariable <- list(
name = 'Lookup Table',
type = 'smm',
parameter = list(
  list(
        type = 'boolean',
        key = 'setDefaultValue',
        value = 'false'
    ),
    list(
        type = 'template',
        key = 'input',
        value = '{{Page Hostname}}'
    ),
    list(
        type = 'list',
        key = 'map',
        list = list(
            list(
            type = 'map',
            map = list(list(
                type = 'template',
                key = 'key',
                value = 'google.co.uk'
            ),
            list(
                type = 'template',
                key = 'value',
                value = 'UA-123456-1'
            )
       )
    ),
    list(
            type = 'map',
            map = list(list(
                type = 'template',
                key = 'key',
                value = 'bing.com'
            ),
            list(
                type = 'template',
                key = 'value',
                value = 'UA-123456-2'
            )
       )
    ),
    list(
            type = 'map',
            map = list(list(
                type = 'template',
                key = 'key',
                value = 'yahoo.com'
            ),
            list(
                type = 'template',
                key = 'value',
                value = 'UA-123456-3'
            )
       )
    )
    )
   )
  )
 )
newLookupTable <- gtm_variables_create(accountId, containerId, workspaceId, updatedVariable)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.