Skip to content

Instantly share code, notes, and snippets.

@goelad
goelad / youtube_tracking_hubspot.js
Created April 9, 2026 07:15
Youtube Tracking -> HubSpot API
<script>
(function () {
// ===== CONFIG =====
// Replace these with the exact HubSpot custom behavioral event IDs/names from your portal.
// If your account uses numeric IDs, put the numbers here instead of strings.
var HUBSPOT_EVENT_MAP = {
25: 'youtube_video_25',
50: 'youtube_video_50',
70: 'youtube_video_70',
100: 'youtube_video_100'