View source: R/gtm_variables_methods.R
Create a new GTM custom variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
account_id |
The ID of the account |
container_id |
The ID of the container |
workspace_id |
The ID of the workspace. Defaults to NULL because this will default to the default workspace. |
token |
An OAuth token object - needs to be set to 'edit containers' |
var_type |
What kind of variable; options are 'parameter','user_property','lookup_table', and 'ga_settings' |
variable_name |
The name of the new custom variable. For Google Analytics, provide the GA property ID. |
set_default |
Do you want to set a default value? Logical vector, but defaults to FALSE |
collect_ad_id |
Do you want to enable Google Analytics Ad ID features? Defaults to FALSE |
default_value |
The default value you are setting. Defaults to NULL |
map_input |
What value you are using for the mapping in the lookup table (only for lookup table). Defaults to NULL |
map_values |
The key-value pairs you want to map, in a dataframe form. This needs to be provided as two columns, ideally with the first called key and the second called value. Defaults to NULL |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.