Boosting efficiency by automating work through a side project
Key point
By reading a taxonomy to auto-generate GTM tags, triggers, and variables, the work became 60 times faster.
Details
To collect accurate user behavior data, tag, trigger, and variable settings in Google Tag Manager(GTM) had to be repeated manually, and in that process, missing events and parameter typos frequently occurred. Event names, conditions, and parameters were managed via Google Sheets, and in some cases more than 50 events were defined on a single page, making the limits of manual management clear.
To solve this problem, a taxonomy-based GTM automation tool was built directly. At first, the approach was to copy the spreadsheet content as-is and convert it to JSON, but since it was hard to debug range errors or text format issues, the structure was changed to use the Google Sheets API to read spreadsheet ranges and convert them into JSON.
The Google Tag Manager API was used to create GTM elements. However, since the API calls have a per-minute limit, requests were split and processed in units, and when a 429 Too Many Requests occurred, retry logic with a 5-second wait before retrying was added to ensure stability.
Templates were also designed separately per tool.
- Since the GTM tag JSON structure differs by service for Mixpanel, GA4, Hackle, and others, templates were separated by each type.
- GTM's container export feature was used to analyze the JSON structure and reflect it in the templates.
- It was built so that even if new tools are added later, expansion is possible simply by defining a template.
A simple table UI was also attached using react-data-table-component to allow checking before and after creation. There's no separate search feature, but it was sufficient for comparing before-and-after data at a glance. When tags already existed, instead of simple modification, the approach taken was to fully update everything based on the taxonomy, and GTM's diff feature allowed reviewing the changes before publishing.
The results were clear.
- 60x improvement in work speed: Setting up 50 events was reduced from about 1 hour to 1 minute.
- Improved data accuracy: Typos and omissions were prevented through taxonomy-based automation.
- Increased collaboration efficiency: The workflow was simplified so that planners only write the taxonomy, and developers run the tool.
- Resolved large-scale tag migration: Even when the GTM container capacity reached 99%, the migration work was completed stably.
The core message is that not a grand system, but a tool that precisely defines a problem and solves it in a small way can create great value. Now, as AI develops rapidly, spending time focusing on "what problems can we solve" is more valuable than vague fear, and if the result saves colleagues' time, that is meaningful enough.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.