Skip to content

WodenWang820118/gtm-config-generator

Repository files navigation

GTM config generator

Overview

The main purpose of the GTM Configuration JSON Generator is to save users' time and increase their productivity by automating the GTM configuration process. By offering an intuitive interface for JSON file creation and management, the app streamlines the workflow, reduces the margin for human error, and ensures the generation of accurate and optimized GTM configuration files. This is especially beneficial for digital marketers, web developers, and SEO experts who need to manage and track multiple website tags, enabling them to focus more on data analysis and less on the technicalities of tag management.

Usage

The expected input is an array of objects:

[
  {
    "event": "begin_checkout",
    "ecommerce": {
      "value": "$value",
      "currency": "$currency",
      "order_source": "$order_source",
      "shipping_tier": "$shipping_tier",
      "items": [
        {
          "item_brand": "$item1.item_brand",
          "item_id": "$item1.item_id",
          "item_name": "$item1.item_name",
          "item_category": "$item1.item_category",
          "item_category2": "$item1.item_category2",
          "item_category3": "$item1.item_category3",
          "item_category4": "$item1.item_category4",
          "item_category5": "$item1.item_category5",
          "currency": "$item1.currency",
          "discount": "$item1.discount",
          "price": "$item1.value",
          "quantity": "$item1.quantity",
          "coupon": "$item1.coupon",
          "index": "$item1.index",
          "item_variant": "$item1.$item_variant"
        }
      ]
    }
  }
]

Note that the dollar sign "$" is intended to be referring to variables, in the current specs. Please add the dollar sign "$" to the beginning of the value.