addTag method

BatchEventData addTag(
  1. String tag
)

Add a tag. Collections are not supported.

Tags can't be longer than 64 characters, and can't be empty. For better results, you should trim/lowercase your strings, and use slugs when possible.

Implementation

BatchEventData addTag(String tag) {
  if (tag.length == 0 || tag.length > _maxStringLength) {
    BatchLogger.public(
        "BatchEventData - Invalid tag. Tags are not allowed to " +
            "be longer than 64 characters (bytes) and must not be empty. " +
            "Ignoring tag '$tag'.");
    return this;
  }
  _tags.add(tag.toLowerCase());
  return this;
}