# Tag Manager API . accounts . containers . tags

## Instance Methods

Creates a GTM Tag.

Deletes a GTM Tag.

Gets a GTM Tag.

Lists all GTM Tags of a Container.

Updates a GTM Tag.

### Method Details

`create(accountId, containerId, body)`

    Creates a GTM Tag.

    Args:
      accountId: string, The GTM Account ID. (required)
      containerId: string, The GTM Container ID. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Represents a Google Tag Manager Tag.
        "scheduleStartMs": "A String", # The start timestamp in milliseconds to schedule a tag.
        "scheduleEndMs": "A String", # The end timestamp in milliseconds to schedule a tag.
        "containerId": "A String", # GTM Container ID.
        "type": "A String", # GTM Tag Type.
        "notes": "A String", # User notes on how to apply this tag in the container.
        "tagId": "A String", # The Tag ID uniquely identifies the GTM Tag.
        "name": "A String", # Tag display name.
        "priority": { # Represents a Google Tag Manager Parameter. # User defined numeric priority of the tag. Tags are fired asynchronously in order of priority. Tags with higher numeric value fire first. A tag's priority can be a positive or negative value. The default value is 0.
          "map": [ # This map parameter's parameters (must have keys; keys must be unique).
            # Object with schema name: Parameter
          ],
          "list": [ # This list parameter's parameters (keys will be ignored).
            # Object with schema name: Parameter
          ],
          "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
          "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
          "type": "A String", # The parameter type. Valid values are:
              # - boolean: The value represents a boolean, represented as 'true' or 'false'
              # - integer: The value represents a 64-bit signed integer value, in base 10
              # - list: A list of parameters should be specified
              # - map: A map of parameters should be specified
              # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
        },
        "blockingRuleId": [ # Blocking rule IDs. If any of the listed rules evaluate to true, the tag will not fire.
          "A String",
        ],
        "liveOnly": True or False, # If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode).
        "fingerprint": "A String", # The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified.
        "firingRuleId": [ # Firing rule IDs. A tag will fire when any of the listed rules are true and all of its blockingRuleIds (if any specified) are false.
          "A String",
        ],
        "firingTriggerId": [ # Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its blockingTriggerIds (if any specified) are false.
          "A String",
        ],
        "parameter": [ # The tag's parameters.
          { # Represents a Google Tag Manager Parameter.
            "map": [ # This map parameter's parameters (must have keys; keys must be unique).
              # Object with schema name: Parameter
            ],
            "list": [ # This list parameter's parameters (keys will be ignored).
              # Object with schema name: Parameter
            ],
            "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
            "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
            "type": "A String", # The parameter type. Valid values are:
                # - boolean: The value represents a boolean, represented as 'true' or 'false'
                # - integer: The value represents a 64-bit signed integer value, in base 10
                # - list: A list of parameters should be specified
                # - map: A map of parameters should be specified
                # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
          },
        ],
        "blockingTriggerId": [ # Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire.
          "A String",
        ],
        "accountId": "A String", # GTM Account ID.
      }

    Returns:
      An object of the form:

        { # Represents a Google Tag Manager Tag.
          "scheduleStartMs": "A String", # The start timestamp in milliseconds to schedule a tag.
          "scheduleEndMs": "A String", # The end timestamp in milliseconds to schedule a tag.
          "containerId": "A String", # GTM Container ID.
          "type": "A String", # GTM Tag Type.
          "notes": "A String", # User notes on how to apply this tag in the container.
          "tagId": "A String", # The Tag ID uniquely identifies the GTM Tag.
          "name": "A String", # Tag display name.
          "priority": { # Represents a Google Tag Manager Parameter. # User defined numeric priority of the tag. Tags are fired asynchronously in order of priority. Tags with higher numeric value fire first. A tag's priority can be a positive or negative value. The default value is 0.
            "map": [ # This map parameter's parameters (must have keys; keys must be unique).
              # Object with schema name: Parameter
            ],
            "list": [ # This list parameter's parameters (keys will be ignored).
              # Object with schema name: Parameter
            ],
            "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
            "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
            "type": "A String", # The parameter type. Valid values are:
                # - boolean: The value represents a boolean, represented as 'true' or 'false'
                # - integer: The value represents a 64-bit signed integer value, in base 10
                # - list: A list of parameters should be specified
                # - map: A map of parameters should be specified
                # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
          },
          "blockingRuleId": [ # Blocking rule IDs. If any of the listed rules evaluate to true, the tag will not fire.
            "A String",
          ],
          "liveOnly": True or False, # If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode).
          "fingerprint": "A String", # The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified.
          "firingRuleId": [ # Firing rule IDs. A tag will fire when any of the listed rules are true and all of its blockingRuleIds (if any specified) are false.
            "A String",
          ],
          "firingTriggerId": [ # Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its blockingTriggerIds (if any specified) are false.
            "A String",
          ],
          "parameter": [ # The tag's parameters.
            { # Represents a Google Tag Manager Parameter.
              "map": [ # This map parameter's parameters (must have keys; keys must be unique).
                # Object with schema name: Parameter
              ],
              "list": [ # This list parameter's parameters (keys will be ignored).
                # Object with schema name: Parameter
              ],
              "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
              "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
              "type": "A String", # The parameter type. Valid values are:
                  # - boolean: The value represents a boolean, represented as 'true' or 'false'
                  # - integer: The value represents a 64-bit signed integer value, in base 10
                  # - list: A list of parameters should be specified
                  # - map: A map of parameters should be specified
                  # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
            },
          ],
          "blockingTriggerId": [ # Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire.
            "A String",
          ],
          "accountId": "A String", # GTM Account ID.
        }

`delete(accountId, containerId, tagId)`

    Deletes a GTM Tag.

    Args:
      accountId: string, The GTM Account ID. (required)
      containerId: string, The GTM Container ID. (required)
      tagId: string, The GTM Tag ID. (required)

`get(accountId, containerId, tagId)`

    Gets a GTM Tag.

    Args:
      accountId: string, The GTM Account ID. (required)
      containerId: string, The GTM Container ID. (required)
      tagId: string, The GTM Tag ID. (required)

    Returns:
      An object of the form:

        { # Represents a Google Tag Manager Tag.
          "scheduleStartMs": "A String", # The start timestamp in milliseconds to schedule a tag.
          "scheduleEndMs": "A String", # The end timestamp in milliseconds to schedule a tag.
          "containerId": "A String", # GTM Container ID.
          "type": "A String", # GTM Tag Type.
          "notes": "A String", # User notes on how to apply this tag in the container.
          "tagId": "A String", # The Tag ID uniquely identifies the GTM Tag.
          "name": "A String", # Tag display name.
          "priority": { # Represents a Google Tag Manager Parameter. # User defined numeric priority of the tag. Tags are fired asynchronously in order of priority. Tags with higher numeric value fire first. A tag's priority can be a positive or negative value. The default value is 0.
            "map": [ # This map parameter's parameters (must have keys; keys must be unique).
              # Object with schema name: Parameter
            ],
            "list": [ # This list parameter's parameters (keys will be ignored).
              # Object with schema name: Parameter
            ],
            "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
            "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
            "type": "A String", # The parameter type. Valid values are:
                # - boolean: The value represents a boolean, represented as 'true' or 'false'
                # - integer: The value represents a 64-bit signed integer value, in base 10
                # - list: A list of parameters should be specified
                # - map: A map of parameters should be specified
                # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
          },
          "blockingRuleId": [ # Blocking rule IDs. If any of the listed rules evaluate to true, the tag will not fire.
            "A String",
          ],
          "liveOnly": True or False, # If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode).
          "fingerprint": "A String", # The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified.
          "firingRuleId": [ # Firing rule IDs. A tag will fire when any of the listed rules are true and all of its blockingRuleIds (if any specified) are false.
            "A String",
          ],
          "firingTriggerId": [ # Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its blockingTriggerIds (if any specified) are false.
            "A String",
          ],
          "parameter": [ # The tag's parameters.
            { # Represents a Google Tag Manager Parameter.
              "map": [ # This map parameter's parameters (must have keys; keys must be unique).
                # Object with schema name: Parameter
              ],
              "list": [ # This list parameter's parameters (keys will be ignored).
                # Object with schema name: Parameter
              ],
              "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
              "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
              "type": "A String", # The parameter type. Valid values are:
                  # - boolean: The value represents a boolean, represented as 'true' or 'false'
                  # - integer: The value represents a 64-bit signed integer value, in base 10
                  # - list: A list of parameters should be specified
                  # - map: A map of parameters should be specified
                  # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
            },
          ],
          "blockingTriggerId": [ # Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire.
            "A String",
          ],
          "accountId": "A String", # GTM Account ID.
        }

`list(accountId, containerId)`

    Lists all GTM Tags of a Container.

    Args:
      accountId: string, The GTM Account ID. (required)
      containerId: string, The GTM Container ID. (required)

    Returns:
      An object of the form:

        { # List Tags Response.
        "tags": [ # All GTM Tags of a GTM Container.
          { # Represents a Google Tag Manager Tag.
              "scheduleStartMs": "A String", # The start timestamp in milliseconds to schedule a tag.
              "scheduleEndMs": "A String", # The end timestamp in milliseconds to schedule a tag.
              "containerId": "A String", # GTM Container ID.
              "type": "A String", # GTM Tag Type.
              "notes": "A String", # User notes on how to apply this tag in the container.
              "tagId": "A String", # The Tag ID uniquely identifies the GTM Tag.
              "name": "A String", # Tag display name.
              "priority": { # Represents a Google Tag Manager Parameter. # User defined numeric priority of the tag. Tags are fired asynchronously in order of priority. Tags with higher numeric value fire first. A tag's priority can be a positive or negative value. The default value is 0.
                "map": [ # This map parameter's parameters (must have keys; keys must be unique).
                  # Object with schema name: Parameter
                ],
                "list": [ # This list parameter's parameters (keys will be ignored).
                  # Object with schema name: Parameter
                ],
                "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
                "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
                "type": "A String", # The parameter type. Valid values are:
                    # - boolean: The value represents a boolean, represented as 'true' or 'false'
                    # - integer: The value represents a 64-bit signed integer value, in base 10
                    # - list: A list of parameters should be specified
                    # - map: A map of parameters should be specified
                    # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
              },
              "blockingRuleId": [ # Blocking rule IDs. If any of the listed rules evaluate to true, the tag will not fire.
                "A String",
              ],
              "liveOnly": True or False, # If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode).
              "fingerprint": "A String", # The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified.
              "firingRuleId": [ # Firing rule IDs. A tag will fire when any of the listed rules are true and all of its blockingRuleIds (if any specified) are false.
                "A String",
              ],
              "firingTriggerId": [ # Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its blockingTriggerIds (if any specified) are false.
                "A String",
              ],
              "parameter": [ # The tag's parameters.
                { # Represents a Google Tag Manager Parameter.
                  "map": [ # This map parameter's parameters (must have keys; keys must be unique).
                    # Object with schema name: Parameter
                  ],
                  "list": [ # This list parameter's parameters (keys will be ignored).
                    # Object with schema name: Parameter
                  ],
                  "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
                  "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
                  "type": "A String", # The parameter type. Valid values are:
                      # - boolean: The value represents a boolean, represented as 'true' or 'false'
                      # - integer: The value represents a 64-bit signed integer value, in base 10
                      # - list: A list of parameters should be specified
                      # - map: A map of parameters should be specified
                      # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
                },
              ],
              "blockingTriggerId": [ # Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire.
                "A String",
              ],
              "accountId": "A String", # GTM Account ID.
            },
        ],
      }

`update(accountId, containerId, tagId, body, fingerprint=None)`

    Updates a GTM Tag.

    Args:
      accountId: string, The GTM Account ID. (required)
      containerId: string, The GTM Container ID. (required)
      tagId: string, The GTM Tag ID. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Represents a Google Tag Manager Tag.
        "scheduleStartMs": "A String", # The start timestamp in milliseconds to schedule a tag.
        "scheduleEndMs": "A String", # The end timestamp in milliseconds to schedule a tag.
        "containerId": "A String", # GTM Container ID.
        "type": "A String", # GTM Tag Type.
        "notes": "A String", # User notes on how to apply this tag in the container.
        "tagId": "A String", # The Tag ID uniquely identifies the GTM Tag.
        "name": "A String", # Tag display name.
        "priority": { # Represents a Google Tag Manager Parameter. # User defined numeric priority of the tag. Tags are fired asynchronously in order of priority. Tags with higher numeric value fire first. A tag's priority can be a positive or negative value. The default value is 0.
          "map": [ # This map parameter's parameters (must have keys; keys must be unique).
            # Object with schema name: Parameter
          ],
          "list": [ # This list parameter's parameters (keys will be ignored).
            # Object with schema name: Parameter
          ],
          "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
          "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
          "type": "A String", # The parameter type. Valid values are:
              # - boolean: The value represents a boolean, represented as 'true' or 'false'
              # - integer: The value represents a 64-bit signed integer value, in base 10
              # - list: A list of parameters should be specified
              # - map: A map of parameters should be specified
              # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
        },
        "blockingRuleId": [ # Blocking rule IDs. If any of the listed rules evaluate to true, the tag will not fire.
          "A String",
        ],
        "liveOnly": True or False, # If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode).
        "fingerprint": "A String", # The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified.
        "firingRuleId": [ # Firing rule IDs. A tag will fire when any of the listed rules are true and all of its blockingRuleIds (if any specified) are false.
          "A String",
        ],
        "firingTriggerId": [ # Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its blockingTriggerIds (if any specified) are false.
          "A String",
        ],
        "parameter": [ # The tag's parameters.
          { # Represents a Google Tag Manager Parameter.
            "map": [ # This map parameter's parameters (must have keys; keys must be unique).
              # Object with schema name: Parameter
            ],
            "list": [ # This list parameter's parameters (keys will be ignored).
              # Object with schema name: Parameter
            ],
            "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
            "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
            "type": "A String", # The parameter type. Valid values are:
                # - boolean: The value represents a boolean, represented as 'true' or 'false'
                # - integer: The value represents a 64-bit signed integer value, in base 10
                # - list: A list of parameters should be specified
                # - map: A map of parameters should be specified
                # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
          },
        ],
        "blockingTriggerId": [ # Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire.
          "A String",
        ],
        "accountId": "A String", # GTM Account ID.
      }

      fingerprint: string, When provided, this fingerprint must match the fingerprint of the tag in storage.

    Returns:
      An object of the form:

        { # Represents a Google Tag Manager Tag.
          "scheduleStartMs": "A String", # The start timestamp in milliseconds to schedule a tag.
          "scheduleEndMs": "A String", # The end timestamp in milliseconds to schedule a tag.
          "containerId": "A String", # GTM Container ID.
          "type": "A String", # GTM Tag Type.
          "notes": "A String", # User notes on how to apply this tag in the container.
          "tagId": "A String", # The Tag ID uniquely identifies the GTM Tag.
          "name": "A String", # Tag display name.
          "priority": { # Represents a Google Tag Manager Parameter. # User defined numeric priority of the tag. Tags are fired asynchronously in order of priority. Tags with higher numeric value fire first. A tag's priority can be a positive or negative value. The default value is 0.
            "map": [ # This map parameter's parameters (must have keys; keys must be unique).
              # Object with schema name: Parameter
            ],
            "list": [ # This list parameter's parameters (keys will be ignored).
              # Object with schema name: Parameter
            ],
            "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
            "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
            "type": "A String", # The parameter type. Valid values are:
                # - boolean: The value represents a boolean, represented as 'true' or 'false'
                # - integer: The value represents a 64-bit signed integer value, in base 10
                # - list: A list of parameters should be specified
                # - map: A map of parameters should be specified
                # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
          },
          "blockingRuleId": [ # Blocking rule IDs. If any of the listed rules evaluate to true, the tag will not fire.
            "A String",
          ],
          "liveOnly": True or False, # If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode).
          "fingerprint": "A String", # The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified.
          "firingRuleId": [ # Firing rule IDs. A tag will fire when any of the listed rules are true and all of its blockingRuleIds (if any specified) are false.
            "A String",
          ],
          "firingTriggerId": [ # Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its blockingTriggerIds (if any specified) are false.
            "A String",
          ],
          "parameter": [ # The tag's parameters.
            { # Represents a Google Tag Manager Parameter.
              "map": [ # This map parameter's parameters (must have keys; keys must be unique).
                # Object with schema name: Parameter
              ],
              "list": [ # This list parameter's parameters (keys will be ignored).
                # Object with schema name: Parameter
              ],
              "value": "A String", # A parameter's value (may contain macro references such as "{{myMacro}}") as appropriate to the specified type.
              "key": "A String", # The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values.
              "type": "A String", # The parameter type. Valid values are:
                  # - boolean: The value represents a boolean, represented as 'true' or 'false'
                  # - integer: The value represents a 64-bit signed integer value, in base 10
                  # - list: A list of parameters should be specified
                  # - map: A map of parameters should be specified
                  # - template: The value represents any text; this can include macro references (even macro references that might return non-string types)
            },
          ],
          "blockingTriggerId": [ # Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire.
            "A String",
          ],
          "accountId": "A String", # GTM Account ID.
        }