Staying Organized
Keeping a clean and organized container is incredibly important.
Naming Conventions
Tags
Tag names should follow the following pattern as much as possible.
[Platform] / [Tag Type] - [What it Measures]
For example a Google Ads conversion for a meeting_schedule event would be added as:
Google Ads / Conversion - meeting_schedule
Using this method keeps platform tags grouped together in the UI.
Triggers
Triggers - should be prefixed with their generic type, and their suffix should describe them without being too verbose.
| Prefix | Suffix Example | Trigger Type |
|---|---|---|
Click |
form.id |
All Elements or Just Links |
Visibility |
Click URL Hostname |
Element Visibility |
Page View |
/contact |
Page View |
DOM Ready |
/about/* |
DOM Ready |
Init |
info.level.agency |
Initialization |
Event |
formhq.form_submit |
Custom Event |
Scroll |
10/25/50/75/90% |
Scroll Depth |
Using this method keeps triggers grouped by type in the UI.
Variables
Similar to tags, variables should be prefixed by platform name (if they are specific to a given platform) - or with their type:
| Prefix | Suffix Example | Variable Type |
|---|---|---|
DL or DLV |
form.id |
Data Layer |
AEV |
Click URL Hostname |
Auto-Event |
DOM |
meta[name="author"] |
DOM Element |
Cookie |
_fbc |
1st Party Cookie |
URL [Component] |
gclid |
URL |
JS or CJS |
Closest [data-component] |
Custom JavaScript |
Global |
location.hash |
JavaScript Global |
Following this (or a similar) pattern allows finding a variable inside the macro select elements easier and helps prevent user from creating duplicates by accident.
Folders
Can/should be used to organize tags based on vendor or partner (e.g. Level may have their own set of Google Ads tags in addition to an in-house marketing team). Do NOT use folders for organizing by platform.
Folders are less useful for Triggers/Variables as they are meant to be reused - as such folders can often be ignored for anything other than tags.