惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
腾讯CDC
V
V2EX
Martin Fowler
Martin Fowler
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog
博客园 - 【当耐特】
Cisco Talos Blog
Cisco Talos Blog
The Hacker News
The Hacker News
K
Kaspersky official blog
Security Latest
Security Latest
H
Help Net Security
博客园_首页
美团技术团队
Spread Privacy
Spread Privacy
博客园 - 司徒正美
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
G
Google Developers Blog
NISL@THU
NISL@THU
爱范儿
爱范儿
I
Intezer
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic
P
Privacy International News Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
V
Vulnerabilities – Threatpost
W
WeLiveSecurity
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Hacker News: Ask HN
Hacker News: Ask HN
I
InfoQ
The Cloudflare Blog
F
Full Disclosure
SecWiki News
SecWiki News
宝玉的分享
宝玉的分享
N
Netflix TechBlog - Medium

Blog of Simple Analytics

The EU wants to kill cookie banners Google is tracking you (even when you use DuckDuckGo) German court rules Meta’s tracking tech violates GDPR Closing the data gap - Simple Analytics x Usercentrics The EU-US data deal may be dead in the water You are missing 20% of your website data with GA4 How a reverse trial will push Simple Analytics to the next level Google will start tracking all your devices (WTF?) Big Tech Fails EU’s Digital Services Act: Only Wikipedia Passes the Test Meta fined $102 million by the Irish Data Protection Commission Europeans spend 575 Million hours per year clicking cookie banners The most interesting GDPR fines GDPR and fines: all there is to know Google loses key antitrust case Web Analytics for Crypto Companies Web analytics for publishers Google pulls Uno Reverse card: Rolls back decision to kill third-party cookies Privacy Monthly July 2024 Privacy Perspectives June 2024 Privacy Monthly June APRA fumbles targeted advertising Privacy Monthly May Meta loses key privacy battle Google delays cookie phase-out once again Privacy Monthly April 2024 Web Analytics and Consent Cookies 101 Privacy Monthly March 2024 German authority cracks down on cookie banners Google Tag Manager vs Google Analytics Google search alternative Data retention in Google Analytics Guide to Google Analytics and Cookie consent What are Google Analytics' identifiers? How to export data from Google Analytics Privacy Monthly February 2024 The Criteo case: a big deal for Big Tech Privacy Monthy January 2024 What the Digital Markets Act means for privacy Google Settles in $5B Incognito Mode Lawsuit Legal troubles for Adobe Analytics Web analytics for nonprofits HIPAA and mental health Why Meta subscriptions are under attack, and why it matters for privacy Privacy Monthly: December Simple Analytics AI Host analytics on Cloudflare Zaraz Add Google Analytics to Convertkit Google Analytics Pricing - Paid vs Free Road to 1 Million ARR - October update CCPA and Data Protection: all there is to know Analytics without a cookie banner Enterprise Analytics Privacy Monthly: November 2023 Delete Act: all you need to know Mobile App Tracking Under Fire The road to 1 Million ARR - September Update Privacy Monthly: October 2023 HIPAA violations First challenge to the EU-US data transfer framework Direct Marketing under GDPR Road to 1 million ARR - August Update CCPA vs CPRA: what is new? Privacy Monthly: September 2023 A/B Testing with Simple Analytics Dobbs v. Jackson ruling is a privacy mess Privacy Monthly: August 2023 What are your rights under the CCPA? When does the CCPA apply? How does the HIPAA compare to the CCPA and GDPR? Why Meta is in a world of trouble CJEU: cookie-based analytics collects sensitive data Road to 1 million ARR - July update All about the new Data Transfer Framework Road to 1 Million ARR - June update What is PHI under HIPAA? Sweden declares Google Analytics illegal Searching for GA4 Alternatives? Top 10 Reliable Options for Google Analyticss Ultimate HIPAA Compliance Checklist: Essential Steps for Healthcare Providers Privacy Monthly: June 2023 More troubles for Google Analytics The path to 1M ARR - May Update Data Processing Agreements Minimal Product Analytics Facebook data transfers declared illegal Is Google Analytics CCPA-compliant? Help us with your input Cookie banners: How to stay GDPR compliant? GDPR Compliance Checklist Privacy Monthly: May 2023 Simple Analytics: Privacy-first website analytics Improve your e-commerce performance with analytics European Facebook blackout is closer than we think Know your website’s Carbon Emissions - and how to reduce it The path to 1M ARR - April 2023 How to track form submissions using Google Tag Manager? Why is my Simple Analytics data different from Google Analytics? Debug Simple Analytics script How to Import Google Analytics Data to Simple Analytics
How to add video tracking using Google Tag Manager?
Iron Brands · 2023-04-24 · via Blog of Simple Analytics

Tracking video plays gives you insights on user engagement with your video content on your site. With it you can gather valuable insights into their behavior and improve your content.

In this article, we'll show you the easiest way to set this up.

Let's dive in!

  1. Set up video tracking events
  2. Add video tracking with Google Tag Manager
  3. Tigger video tracking events
  4. Final Thoughts

Michelin chose Simple AnalyticsJoin them

Set up video tracking events

We will use Simple Analytics in combination with Google Tag Manager instead of Google Analytics. Using these tools setting up video tracking is 10x easier than using GA4.

Suppose you have a video on your website and want to track both when users start playing it and when they finish watching it. We'll demonstrate this process for YouTube videos, but it should apply to other video platforms too.

We have created a demo website with an embedded video to show you how to track video events.

video-test.png

Follow these steps to set up Google Tag Manager with Simple Analytics to track video events:

  1. Open Google Tag Manager and create a new tag called "Video Events."
  2. Set up a custom trigger for YouTube videos by clicking the "+" button in the top right corner and selecting "YouTube Video" from the list.

video-trigger.png

  1. Enable "Start" and "Complete" events and ensure that "JavaScript API" is enabled in the "Advanced" section.

video-javascript-enable.png

  1. Save the trigger configuration.
  2. In the "Video Events" tag, add the custom HTML code snippet as shown below.

<script>
  if (window.sa_event) {
    sa_event("video_{{Video Status}}", {
      video_provider: "{{Video Provider}}",
      video_title: "{{Video Title}}",
      video_url: "{{Video URL}}"
    })
  }
</script>

This checks if the "sa_event" function is available and sends video events ("video_start" and "video_complete") to Simple Analytics using variables like "Video Status," "Video Provider," "Title," and "URL."

  1. Save the tag configuration and go to "Variables" to configure the built-in variables for these video events.

video-variables.png

  1. Select "Provider," "Status," "URL," and "Title" under the "Video" section.
  2. Save the variable configuration, submit your changes, and publish them to Google Tag Manager.

Tigger video tracking events

Once you've set everything up, you should refresh your website an play the video to the end to trigger the events.

Check your Simple Analytics dashboard's "Events Explorer" to see the recorded video start and complete events with metadata such as provider, title, and URL.

video-dashboard.png

Final Thoughts

With this setup, you can effectively track video engagement on your website and use the collected data to improve your site's user experience and content strategy.

Simple Analytics is a website analytics tool that lets you track your most important metrics in a straightforward dashboard. You don't need the complexity of GA4. Check our live analytics dashboard to see for yourself.