How lucianfialho/30-seconds-gtm works
Main System Components
a) Snippet Collection Layer
• Divide into three main categories:
• GA4 Conversion Snippets (Facebook Integration)
• Utility Snippets (Device Detection, AdBlock Detection, etc.)
• Legacy UA Conversion Snippets (Deprecated)
b) Integration Points
• Google Tag Manager Interface
• Analytics Platforms:
• Google Analytics 4
• Facebook Pixel
• Universal Analytics (marked as deprecated)
[GTM Implementation Environment]
• ↑
[30 Seconds GTM Library]
• ↓
[Snippet Categories]
• / | \
• / | \
GA4 Utility UA
Conv. Scripts Conv.
• ↓ ↓ ↓
[Target Platforms]
Component Details
a) Snippet Transformations:
• Conversion flows:
• GA4 → Facebook Pixel
• UA → GA4 (deprecated)
• Raw Data → Formatted Objects
b) Utility Functions:
• Client/Session ID retrieval
• Device detection
• Form data capture
• AdBlock detection
Implementation Notes
• Use rounded rectangles for processes
• Version/deprecation indicators where applicable
Additional Elements
A small section showing:
• Snippet template structure
• Contribution flow
• Documentation integration
Remember to include a note about the project's primary purpose: providing ready-to-use code snippets for GTM custom JavaScript variables, with emphasis on analytics data transformation and utility functions.
This system design should help developers understand both the overall architecture and the practical application of the snippets in a GTM environment.