| # | Parameter | Type | Events | Example value | Notes |
|---|
Fires when user clicks on a downloadable resource link (Google Sheets UTM template, etc.)
Trigger: User clicks resource link with data-track-resource attribute · Frequency: Once per resource per session
| Parameter | Type | Example | Notes |
|---|---|---|---|
| content_type | string | "utm_template" | Type of resource being downloaded |
| destination_url | string | https://docs.google.com/spreadsheets/... | URL of the resource being downloaded |
| template_type | string | "utm_generator" | Specific template type (optional) |
Automatically detects and tracks clicks on all external links (social profiles, GitHub, external resources, etc.)
Trigger: User clicks external link · Frequency: Once per unique external domain per session
| Parameter | Type | Example | Notes |
|---|---|---|---|
| destination_domain | string | "linkedin.com" | Domain only (no path or query params for privacy) |
| destination_url | string | https://www.linkedin.com/in/guillermo/ | Full URL of the external link |
| link_text | string | "Follow on LinkedIn" | Anchor text (max 100 chars) |
| section | string | "article_footer" | Page section: article_footer, article_body, navbar, footer, etc. |
Fires at 25%, 50%, 75%, 100% scroll thresholds on every blog post
Trigger: User scrolls page · Frequency: Once per threshold per session
| Parameter | Type | Example | Notes |
|---|---|---|---|
| scroll_percentage | integer | 25 | Milestones: 25 · 50 · 75 · 100 |
| time_to_scroll | integer | 12 | Seconds from page load to milestone |
| content_id | string | "Getting Started with GA4" | Post title from window.TNK_PAGE.name |
Fires on tab close or navigation away — total active reading time excluding background tab time
Trigger: beforeunload event · Threshold: Only if > 10 seconds active time
| Parameter | Type | Example | Notes |
|---|---|---|---|
| engagement_duration_seconds | integer | 42 | Active reading time (excludes background time via Page Visibility API) |
| content_id | string | "Getting Started with GA4" | Post title |
| content_category | string | "Analytics" | Category from window.TNK_PAGE.category |
Fires when user clicks "Copy" button on code blocks in blog posts
Trigger: User clicks copy button · Frequency: Once per code block per session
| Parameter | Type | Example | Notes |
|---|---|---|---|
| code_language | string | "javascript" | Detected from class attribute on <code> element (e.g., class="language-javascript") |
| code_lines | integer | 7 | Number of non-empty lines in copied snippet |
| snippet_index | integer | 0 | Zero-indexed position of code block on page |
| content_id | string | "Getting Started with GA4" | Post title |
Measures when the largest content element becomes visible to the user
Trigger: Page fully loaded · Frequency: Once per session
| Threshold | Rating | Definition |
|---|---|---|
| ≤ 2.5 seconds | good | Excellent user experience |
| 2.5 — 4.0 seconds | needs_improvement | Acceptable but could be better |
| > 4.0 seconds | poor | Poor user experience — needs optimization |
Measures how quickly a page responds to user interactions (clicks, taps, keyboard input)
Trigger: After user interaction · Frequency: Multiple times per session
| Threshold | Rating | Definition |
|---|---|---|
| ≤ 200 ms | good | Responsive and interactive |
| 200 — 500 ms | needs_improvement | Acceptable response time |
| > 500 ms | poor | Slow interactions — frustrating for users |
Measures visual stability — how much the page layout shifts during loading and interaction
Trigger: Layout shifts occur · Frequency: Continuous during page interactions
| Threshold | Rating | Definition |
|---|---|---|
| ≤ 0.1 | good | Minimal layout shifts — stable page |
| 0.1 — 0.25 | needs_improvement | Some unexpected shifts |
| > 0.25 | poor | Significant shifts — poor user experience |
Note: CLS is unitless (0–1 scale). Each 1 is a shift of 100% of viewport. A shift of 0.05 means 5% of viewport height shifted unexpectedly.
| # | Variable Name | Data Layer Variable Name | Used In Event(s) |
|---|---|---|---|
| page_view | |||
| 01 | dlv - page_name | page_name | page_view |
| 02 | dlv - page_category | page_category | page_view |
| 03 | dlv - page_type | page_type | page_view |
| 04 | dlv - content_group | content_group | page_view |
| 05 | dlv - page_author | page_author | page_view |
| select_content | |||
| 06 | dlv - content_type | content_type | select_content |
| 07 | dlv - content_id | content_id | select_content · post_engagement |
| 08 | dlv - content_name | content_name | select_content · post_engagement |
| 09 | dlv - item_list_name | item_list_name | select_content |
| 10 | dlv - destination_url | destination_url | select_content |
| generate_lead | |||
| 11 | dlv - form_name | form_name | generate_lead |
| 12 | dlv - form_id | form_id | generate_lead |
| 13 | dlv - subject | subject | generate_lead |
| 14 | dlv - budget | budget | generate_lead |
| 15 | dlv - message_word_count | message_word_count | generate_lead |
| 16 | dlv - message_char_count | message_char_count | generate_lead |
| 17 | dlv - message_filled | message_filled | generate_lead |
| 18 | dlv - email_sha256 | email_sha256 | generate_lead |
| orbit_interaction | |||
| 19 | dlv - orbit_pause | orbit_pause | orbit_interaction |
| 20 | dlv - skill_hover | skill_hover | orbit_interaction |
| search | |||
| 21 | dlv - search_term | search_term | search |
| 22 | dlv - search_results_count | search_results_count | search |
| 23 | dlv - search_has_results | search_has_results | search |
| 24 | dlv - search_term_length | search_term_length | search |
| 25 | dlv - search_section | search_section | search |
| 26 | dlv - search_active_filter | search_active_filter | search |
| post_engagement | |||
| 27 | dlv - action | action | post_engagement |
| # | Trigger Name | Type | Event Name / Fires On |
|---|---|---|---|
| 01 | All Pages | Page View – Window Loaded | All Pages |
| 02 | CE - page_view | Custom Event | page_view |
| 03 | CE - select_content | Custom Event | select_content |
| 04 | CE - generate_lead | Custom Event | generate_lead |
| 05 | CE - orbit_interaction | Custom Event | orbit_interaction |
| 06 | CE - search | Custom Event | search |
| 07 | CE - post_engagement | Custom Event | post_engagement |
| # | Tag Name | Tag Type | GA4 Event Name | Trigger | Key Parameters / Notes |
|---|---|---|---|---|---|
| 01 | GA4 - Configuration | Google Tag | — | All Pages | send_page_view: false · Tag ID: G-25V933JKJD |
| 02 | GA4 - page_view | GA4 Event | page_view | CE - page_view | page_name · page_category · page_type · content_group · page_author |
| 03 | GA4 - select_content | GA4 Event | select_content | CE - select_content | content_type · content_id · content_name · item_list_name · destination_url |
| 04 | GA4 - generate_lead | GA4 Event | generate_lead | CE - generate_lead | form_name · form_id · subject · budget · message_word_count · message_char_count · message_filled · email_sha256 |
| 05 | GA4 - orbit_interaction | GA4 Event | orbit_interaction | CE - orbit_interaction | orbit_pause · skill_hover |
| 06 | GA4 - search | GA4 Event | search | CE - search | search_term · search_results_count · search_has_results · search_term_length · search_section · search_active_filter |
| 07 | GA4 - post_engagement | GA4 Event | post_engagement | CE - post_engagement | content_id · content_name · action |
| # | Display Name | Event Parameter | Scope |
|---|---|---|---|
| Page | |||
| 01 | Page Name | page_name | Event |
| 02 | Page Category | page_category | Event |
| 03 | Page Type | page_type | Event |
| 04 | Content Group | content_group | Event |
| 05 | Page Author | page_author | Event |
| Navigation / Clicks | |||
| 06 | Content Type | content_type | Event |
| 07 | Content ID | content_id | Event |
| 08 | Content Name | content_name | Event |
| 09 | Item List Name | item_list_name | Event |
| 10 | Destination URL | destination_url | Event |
| Lead Form | |||
| 11 | Form Name | form_name | Event |
| 12 | Form ID | form_id | Event |
| 13 | Subject | subject | Event |
| 14 | Budget | budget | Event |
| 15 | Message Filled | message_filled | Event |
| 16 | Email SHA-256 | email_sha256 | Event |
| Skills / Orbit | |||
| 17 | Orbit Pause | orbit_pause | Event |
| 18 | Skill Hover | skill_hover | Event |
| Search | |||
| 19 | Search Has Results | search_has_results | Event |
| 20 | Search Section | search_section | Event |
| 21 | Search Active Filter | search_active_filter | Event |
| Post Engagement | |||
| 22 | Engagement Action | action | Event |
| # | Display Name | Event Parameter | Unit |
|---|---|---|---|
| 01 | Message Word Count | message_word_count | Standard (integer) |
| 02 | Message Char Count | message_char_count | Standard (integer) |
| 03 | Search Results Count | search_results_count | Standard (integer) |
| 04 | Search Term Length | search_term_length | Standard (integer) |
generate_leadgenerate_leadImplemented Core Web Vitals tracking to monitor real user experience metrics. Automatically captures LCP (Largest Contentful Paint), INP (Interaction to Next Paint), and CLS (Cumulative Layout Shift) on all pages with automatic performance rating classification.
web_vitals — Tracks Core Web Vitals: LCP, INP, CLS with automatic performance ratingsmetric_name (LCP/INP/CLS), metric_value (ms or unitless), metric_rating (good/needs_improvement/poor)<head> with web-vitals library (v3.5.2 via CDN)Implemented comprehensive engagement tracking for blog posts. Captures scroll behavior, active reading time, and code snippet interactions. Includes automatic injection of copy buttons on all code blocks with language detection and line counting.
scroll_depth — Tracks scroll milestones (25%, 50%, 75%, 100%) with time-to-scroll metricengagement_time — Measures active reading time, excludes tab background visibilitycode_copy — Tracks code snippet copies with language and line count/js/engagement-tracking.js — Auto-injects copy buttons, detects code language from classscroll_percentage, time_to_scroll, engagement_duration_seconds, code_language, code_lines, snippet_indexAdded new event types to close the UTM tracking loop and capture outbound link engagement. Implemented automatic detection and tracking of external links, plus specific resource download tracking for Google Sheets templates and other downloadable assets.
resource_download — Tracks clicks to downloadable resources (Google Sheets UTM generator template, etc.)outbound_click — Automatically detects and tracks all external links to social profiles, resources, and external sitesdestination_domain, template_type added to tab2_parameters.csv/js/outbound-tracking.js (auto-detection), /js/resource-tracking.js (resource downloads)blog/utms-importacion-campanas-ga4.html now has resource_download tracking on the Google Sheets template linkAdded new blog post "UTMs y Importación de Campañas en GA4" to tracking coverage. New page instrumented with page_view, new blog card tracked via select_content in the blog listing, full post_engagement coverage (likes & comments via Supabase), and a new outbound template CTA link inside the article body.
blog/utms-importacion-campanas-ga4.html added to page_view trackingblog_card select_content entry for the UTM/GA4 post in the blog listingutms_importacion_campanas_ga4external_link content_type value on select_content — first use, for the "Hacer una copia de la plantilla" outbound Google Sheets CTA in the article bodyUpdated all site URL references from the Vercel staging domain to the new custom domain tnkproject.com. No tracking changes — documentation update only.
https://tnk-project.vercel.app/ → https://tnkproject.com/Added new blog post "Analytics Documentation That Never Goes Stale" to tracking coverage. New page instrumented with page_view, new blog card tracked via select_content in the blog listing, and full post_engagement coverage (likes & comments via Supabase).
blog/analytics-doc-automation.html added to page_view trackingblog_card select_content entry for the doc-automation post in the blog listinganalytics_doc_automationCompleted the page_view tab to include all 14 pages currently live on the site. Previously only 5 pages were documented. Also fixed broken screenshot references from v4.1 (pv_blog_doc_automation, sc_blog_card_doc_auto) and added the missing page_view for Portfolio Security Audit.
pv_blog_doc_automation.png, sc_blog_card_doc_auto.png)Added GTM & GA4 Setup reference tab documenting the exact naming conventions for all GTM objects and GA4 configuration items. GTM container GTM-KW97DTMV deployed to all 13 site pages. GA4 property G-25V933JKJD connected.
dlv - * naming pattern)CE - * naming pattern for custom events)GA4 - * naming pattern)generate_lead marked as GA4 conversionUnified post engagement tracking into a single post_engagement event. Standardised all content_id values across events to use underscores instead of hyphens.
blog_like + blog_comment with single post_engagement eventaction parameter now carries like | unlike | commentcomment_length parameter — no longer sentcontent_id values across select_content and post_engagement now use _ separators (e.g. beautiful_dashboards)post_engagement with underscore slugsAdded post-level engagement features to all 7 blog post pages: likes (heart button with toggle) and comments (form + listing). Backed by Supabase with Row-Level Security. Two new GA4 events, two new parameters.
blog_like, blog_commentaction (like|unlike), comment_lengthpost_likes and post_commentslocalStorage["tnk_browser_id"] (UUID)First complete measurement plan for the TNK Designs portfolio. Covers all 5 events with full parameter documentation, dataLayer push examples, and per-row screenshots with element highlights.
page_view, select_content, generate_lead, orbit_interaction, searchVersioning rules
A new version is created for every major update: new event added, existing event removed or renamed, new parameter added/removed, tracking approach changed. Minor fixes (typos, broken links, screenshot refreshes) do not increment the version. Before each version bump, the current file is archived to archive/measurement_plan_vN.html.