YouTube Integration Usage Guide
Overview
This guide explains how to use the YouTube integration elements created for Minimal 3DP.
Files Created
/content/_templates/youtube-description.txt- Template for YouTube video descriptions/layouts/partials/youtube-subscribe-cta.html- Full CTA box for blog posts/layouts/partials/watch-on-youtube.html- Compact badge for tutorials
1. YouTube Video Description Template
Location: /content/_templates/youtube-description.txt
Usage:
- Copy the template content
- Replace
[page-url]with the actual blog post URL - Add your timestamps
- Add product affiliate links if applicable
- Paste into YouTube video description
Example:
π― Learn how to calibrate pressure advance in Klipper for perfect prints
π FULL WRITTEN GUIDE: https://minimal3dp.com/klipper-calibration/pressure-advance/
Get step-by-step instructions, additional tips, and downloadable resources on the website.
[... rest of template ...]
β±οΈ TIMESTAMPS
βββββββββββββββββββββ
0:00 - Introduction
1:30 - Finding your printer's settings
3:45 - Running the test
6:20 - Analyzing results
8:15 - Final calibration
2. YouTube Subscribe CTA (Full Box)
Location: /layouts/partials/youtube-subscribe-cta.html
When to Use:
- At the end of blog posts
- After tutorials
- In “About” pages
- Anywhere you want maximum visibility
Usage in Markdown:
{{ partial "youtube-subscribe-cta.html" . }}
What it looks like:
- Red gradient background box
- YouTube icon
- “Watch on YouTube” heading
- Subscriber count (from hugo.toml)
- Large “Subscribe Now” button
- GA4 tracking included
Requirements:
youtube_channel_idmust be set in hugo.toml- Optional:
youtube_subscribersfor display
3. Watch on YouTube Badge (Compact)
Location: /layouts/partials/watch-on-youtube.html
When to Use:
- At the top of tutorials
- Quick links to video versions
- Compact alternative to full CTA
Usage in Markdown:
{{ partial "watch-on-youtube.html" (dict "videoId" "VIDEO_ID" "title" "Watch Tutorial") }}
Parameters:
videoId(required): The YouTube video ID (e.g., “DJZnYB0IVCY”)title(optional): Custom link text (default: “Watch on YouTube”)
Example:
{{ partial "watch-on-youtube.html" (dict "videoId" "DJZnYB0IVCY" "title" "Watch Full Tutorial") }}
What it looks like:
- Compact red badge
- YouTube icon
- Video title as link
- GA4 tracking included
4. YouTube Embed Shortcode (Already Created)
Location: /layouts/shortcodes/youtube-embed.html
Usage in Markdown:
What it includes:
- Responsive 16:9 iframe
- YouTube nocookie domain (privacy-friendly)
- Automatic subscribe button below video
- GA4 tracking
Example:
Recommended Content Structure
For Tutorial Posts (with video):
---
title: "Tutorial: Klipper Pressure Advance Calibration"
---
<!-- Top of post: Link to full video -->
{{ partial "watch-on-youtube.html" (dict "videoId" "ABC123" "title" "Watch Full Tutorial") }}
## Introduction
[Your tutorial content...]
## Step 1: Setup
[Content...]
<!-- Mid-post: Embed the actual video -->
## Step 2: Running the Test
[Content...]
## Conclusion
[Content...]
<!-- End of post: Subscribe CTA -->
{{ partial "youtube-subscribe-cta.html" . }}
For Blog Posts (without video):
---
title: "The Ultimate 3D Printing Filament Guide (2025)"
---
## Introduction
[Your content...]
## Main Content
[Content...]
## Conclusion
[Content...]
<!-- End of post: Encourage YouTube subscription -->
{{ partial "youtube-subscribe-cta.html" . }}
GA4 Event Tracking
All YouTube integration elements include automatic GA4 tracking:
Events Tracked:
youtube_subscribe_click
- Category: YouTube
- Label: Source (e.g., “blog-cta”, “embed”)
- Value: 1
youtube_video_click
- Category: YouTube
- Label: Video title
- video_id: YouTube video ID
- Value: 1
View in GA4:
- Go to Reports β Engagement β Events
- Look for
youtube_subscribe_clickandyoutube_video_click
Homepage Integration
The homepage (content/_index.md) already includes:
- YouTube subscribe button in the hero section
- YouTube channel link in the features section
- Popular videos section
No additional changes needed for homepage.
Best Practices
1. Always Link to Written Content
- Every YouTube video should have a corresponding blog post
- Include the blog post URL in video description
- This drives traffic back to your site
2. Use CTAs Strategically
- Top of tutorial: Use compact badge (
watch-on-youtube.html) - Middle of post: Embed full video (
youtube-embedshortcode) - End of post: Use full CTA box (
youtube-subscribe-cta.html)
3. Update Video Descriptions
- Use the template for consistency
- Always include:
- Link to written guide
- Link to tools
- Timestamps
- Hashtags
4. Track Performance
- Monitor GA4 events weekly
- Check which CTAs drive most subscriptions
- Adjust placement based on data
Quick Reference
| Component | File | Use Case | Size |
|---|---|---|---|
| Video Description Template | content/_templates/youtube-description.txt | YouTube video descriptions | N/A |
| Subscribe CTA | layouts/partials/youtube-subscribe-cta.html | End of blog posts | Large box |
| Video Badge | layouts/partials/watch-on-youtube.html | Quick video links | Compact badge |
| Video Embed | layouts/shortcodes/youtube-embed.html | Inline video | Responsive iframe |
Testing
After implementing, test:
- β
Build site:
hugo --gc --minify - β Check GA4 events fire (use browser console)
- β Test subscribe buttons redirect correctly
- β Verify video embeds load on mobile
- β Check hover effects on CTA buttons
Future Enhancements
Potential additions:
- YouTube playlist embed shortcode
- Latest videos widget for sidebar
- Video gallery page
- Automated video thumbnail generation
- Shorts integration
Last Updated: November 13, 2025
Maintained by: Minimal 3DP