View source: R/gtm_tags_methods.R
Create a new tag in the container
1 2 3 4 5 6 7 8 9 10 11 12 13 | gtm_tags_create(
account_id,
container_id,
workspace_id,
tag_name,
token,
fields_to_set,
ga_values,
custom_dimensions = NULL,
custom_metrics = NULL,
firing_triggers = NULL,
blocking_triggers = NULL
)
|
account_id |
The ID of the account |
container_id |
The ID of the container |
workspace_id |
The ID of the workspace |
tag_name |
The name of the tag |
token |
An OAuth token object |
fields_to_set |
A tibble of the fields to set, with the first column called 'field' and the second 'value' |
ga_values |
The GA values that you want to pass, including the GA ID, the event category, event action, and event label |
custom_dimensions |
The custom dimensions you want to pass, provided as a two-column tibble with the index and the value. Defaults to NULL |
custom_metrics |
The custom metrics you want to pass, provided as a two-column tibble with the index and the value. Defaults to NULL |
firing_triggers |
The IDs of the triggers you want to use to fire the tag, passed as an integer or a vector (for multiple triggers). Defaults to NULL |
blocking_triggers |
The IDs of the triggers you want to use to stop the tag from firing, passed as an integer or a vector (for multiple triggers). Defaults to NULL |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.