How to access parent element's ID with .closest() in Google Tag Manager

  Рет қаралды 3,404

Analytics Mania - Google Analytics & Tag Manager

Analytics Mania - Google Analytics & Tag Manager

6 ай бұрын

In this video, you will learn an advanced technique. If the visitor interacts with an element (e.g., sees it), you can use Google Tag Manager and Custom JavaScript to fetch the parent element’s ID.
This will be done with a method called .closest().
=== LINKS ===
Subscribe to our KZfaq channel / @analyticsmania
✭ Video: How to track form submissions with Element Visibility trigger
• How to track forms wit...
✭ Learn more about CSS selectors in this GTM course
www.analyticsmania.com/course...
=== CONNECT WITH JULIUS & ANALYTICS MANIA ===
✭ Facebook / analyticsmania
✭ Twitter / fedorovicius
✭ Linkedin / fedorovicius
Subscribe to our KZfaq channel / @analyticsmania
#googletagmanager

Пікірлер: 9
6 ай бұрын
Recently a technical guy explain (he was coding quickly...) me this procedure for example to get the title of a blog post. It was very technical and he used Jquery library - and call/name the process "bubbling" :D. Nicely done and very usefull video, Julius! Thanks.
@GuilhermoLuna
@GuilhermoLuna 5 ай бұрын
Amazing. Thanks.
@marcobruni5402
@marcobruni5402 3 ай бұрын
Cool!
@ianchien1749
@ianchien1749 6 ай бұрын
Hi, Julius, thank you for sharing. I have a question: Does having too many JS variables affect the page loading speed?
@MarcovandeMeulenhof
@MarcovandeMeulenhof 6 ай бұрын
Nice video again Julius! Why not get the value of data-form_id with .val() instead of .dataset.form_id? Easier to understand and read in my opinion. Keep up doing those videos... I am a fan!
@AnalyticsMania
@AnalyticsMania 6 ай бұрын
There are different ways to achieve the same result :)
@follow_the_rabbit
@follow_the_rabbit 6 ай бұрын
Hey Julius, thank u for video. Im in a common with u since 2020 :D Is there possibility nowadays to track users with adblock? I know few years earlier I've introduce that in one of my container but nowadays it seems that I need server side. What do You think guys?
@LorenzoMallaci
@LorenzoMallaci 3 ай бұрын
Hi Julius, great video! Is it possible that this only works on a form that shows a success message but also keeps displaying the form itself without switching it to display:none after submission? I've been following each single step and always kept getting an "undefined" result in my variable. I've tried to change it to track something from inside the success message element and now it works. Just wondering if the display:none could affect the results?
@AnalyticsMania
@AnalyticsMania 3 ай бұрын
If messgae disappears after several seconds, it should not affect
Click Element Variable in Google Tag Manager (how to use it correctly)
16:12
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 43 М.
10 Google Tag Manager best practices
14:58
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 8 М.
Beautiful gymnastics 😍☺️
00:15
Lexa_Merin
Рет қаралды 15 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 40 МЛН
How To Debug React Apps Like A Senior Developer
21:07
Web Dev Simplified
Рет қаралды 62 М.
Track many forms with one Thank You page (with Google Tag Manager)
15:59
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 3,2 М.
5 React Native Tips to WOW Your Users
16:36
Simon Grimm
Рет қаралды 16 М.
10 Google Analytics 4 best practices
12:41
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 6 М.
How to Use CSS Selectors in Google Tag Manager
34:41
MeasurementMarketing,io
Рет қаралды 7 М.
Direct traffic in Google Analytics 4 (and how to fix it)
15:51
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 6 М.
How to track conversions with Google Ads and Google Tag Manager + send dynamic values
19:45
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 118 М.
13 Things To Remove From Your Website Immediately
12:33
Orbit Media Studios
Рет қаралды 297 М.
10 Google Tag Manager mistakes you should avoid
9:30
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 3,6 М.
S24 Ultra and IPhone 14 Pro Max telephoto shooting comparison #shorts
0:15
Photographer Army
Рет қаралды 9 МЛН
АЙФОН 20 С ФУНКЦИЕЙ ВИДЕНИЯ ОГНЯ
0:59
КиноХост
Рет қаралды 1,1 МЛН
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 26 МЛН