tag_payload | object or string | Yes | - | Full Tag resource (object or JSON string) matching the Google Tag Manager API v2 Tag spec. Must include name and type; other fields like parameter, firingTriggerId, blockingTriggerId, paused, and notes follow the spec. Use gtm_list_triggers to find firing trigger IDs, or copy a tag from gtm_list_tags and edit it (read-only fields are stripped automatically). The type is Google’s short template code, and an unknown code is rejected as an unknown entity type, so never guess it. To find a code: run gtm_list_tags or gtm_get_tag on any container that already has that kind of tag, which gives the exact type and parameter keys; if none has it, add the tag once in the Tag Manager interface and read it back the same way; the compiled script of any published container, served by googletagmanager.com for its GTM- id, lists every tag as a function named with two underscores plus the code and its parameters prefixed with vtp_; and Google’s Tag Manager developer documentation on restricting tag deployment has a table of built-in codes, partial and dated. Once the type is right, Google’s error names the required parameters that are missing, so creating the tag with only name and type is a quick way to learn them. Examples: ‘googtag’, ‘gaawe’, ‘html’, ‘awct’, ‘gclidw’, ‘sp’, and ‘awcc’ (Google Ads Calls from Website Conversion, which needs phoneConversionNumber, conversionId and conversionLabel); server containers use different codes such as ‘sgtmgaaw’. Example GA4 event tag: {“name”: “GA4 - Purchase”, “type”: “gaawe”, “parameter”: [{“type”: “template”, “key”: “eventName”, “value”: “purchase”}, {“type”: “template”, “key”: “measurementIdOverride”, “value”: “G-XXXXXXX”}], “firingTriggerId”: [“12”]} |