In this video, I'm going to show you how you can detect if a user reloaded the page so
you can prevent your tags from firing again.
All and more, coming up.
Hey there.
And welcome back to another video of measureschool.com teaching you the data-driven way of digital
marketing.
My name is Julian.
And on this channel, we do marketing tech reviews, tips, and tricks, videos, and tutorials
just like this
one.
So if you haven't yet, consider subscribing.
Now today, we want to talk about how we can detect with Google Tag Manager if a user
reloaded this page.
This is particularly important if you have a page view trigger on your certain tags,
and want to prevent them from
firing again and again if the user clicks on that reload button.
Now to do all this, we will utilize a browser API, write a little bit
of custom JavaScript, and then put this all into our trigger condition so we can prevent
our tags from firing again on a reload.
Now we
got lots to cover so let's dive in.
All right, back in our demo shop.
We now want to detect whether somebody reloads the browser up
here or just presses Enter here again, which will also reload the page.
How would we be able to do this?
Since Google Tag Manager has
many JavaScript we can make use of the JavaScript APIs that the browser provides.
Nowadays a browser API called the navigation timing
API, which provides a method called the performance and navigation.
If we wanted to try this out, we can just open up our developer
tools, the under more tools and developer tools, navigate to the console and type in
here our
performance navigation.
Here we go, we get
an object back with two keys in here type and redirect count.
Now I'm interested in the type.
So just going to put in the dot and then
type and we get it number 1 back.
Now, there's number 1 actually represent if we have reloaded this page, or if he navigated
onto it
through another way.
So let's reload this page.
And I'm going to press the up arrow to get my last command back, press enter, and get
a
number 1.
What if I go to a different page right here
and press the up arrow again?
You get a zero.
Again, let's try this out inside of
our demo shop here.
If I navigate to any page
and try out this command in our developer tools, I get a zero.
If I reload the page,
I get
a number one.
So we can use this indication if it's zero or one to determine whether somebody reloaded
this page or navigated to it by
another way through a normal link.
Now, before we build this into Google Tag Manager, I need to make you aware that this
technology is
something that is already being phased out.
So in future iterations of browsers, we will need to use navigation time level two
specification, which is currently developed.
But for now, our navigation timing API is still valid.
It is supported by the major
browsers, unfortunately, not by Opera on a mobile device.
So you need to be aware of this downside if you want to use this technique.
For me, it's good enough, there are a lot of browsers that support this.
So let's build us into Google Tag Manager.
Since we have here
one line of code, which really just accesses the global namespace and our browser API,
we can utilize a variable that simply accesses
that.
So let's go over to Google Tag Manager.
And we go over to our variables.
And here we are going to define a new user-defined
variable.
This will be a JavaScript variable to detect our reload
as a type will choose the JavaScript variable, not the custom
JavaScript variable, but the JavaScript variable.
And here is where we can input our global variable name.
And as we have done so
before, we can just use our performancenavigation.type.
Let's try this out and save this.
Refresh, refresh our page.
And since we
refresh just now, we can see our JS reload is number one.
Notice that the variable already gets filled on the first event here, so
we'll be safe to use it at the earliest point in our triggers later on, which is the page
view normally.
Let's try the negative case,
I'm just going to navigate to any page.
Check the variables again,
and we see js reload is now zero.
So we can already detect whether
somebody reloads the page,
our variables should show the number one.
Now, maybe that's a little bit inconvenient because you need to
remember, okay, one is reload, zero is not real.
But you could use it like this already.
If you want to have it a little bit more
convenient, we can utilize a custom JavaScript variable.
So let's go over to variables
and build another variable.
This is our custom
JavaScript variable for the reload.
I'm going to choose custom JavaScript.
Will input our anonymous function.
And we simply going to put
in an if statement.
So if our performance navigation type equals one, let's say equals zero, so we do the opposite
case, then
we want to
return the value of false.
Or else we want to return the value of true.
So if it's one or any other number, it will return true.
This
will come in handy in a second.
Now if you're well versed in JavaScript, you might notice that this could be shorter.
We could use a
ternary operator, which would simply be to return the performance navigation equals zero
with a question mark.
And if this is true, we
want to return false.
Otherwise, we want to return true.
And that's exactly the same expression as it is here written in five lines,
whichever you prefer.
I'll delete this and make this really short for us.
Let's try this out.
Let's save this,
refresh,
and refresh our
page.
And we can see our JS reload is one and our custom JavaScript is now turned to true that
means a reload has happened.
Now if you
navigate
into this again,
we see our reload is false.
So this is a regular navigation point.
Now, what is also interesting about what we
have just written is if we click on the back button here,
this will also be counted as a reload, as the JS reload, or the navigation
type will change the number to 2, which means that the user has navigated through History
API here.
So if I go forward again,
this is
again, a true for reload.
So anytime somebody reloads something, anytime somebody presses enter, here again, on the
same URL, it will
always remain
a reload.
It doesn't matter if the user navigates here, clicks the reload button, or types in the
URL.
Only if there's a
new URL, for example,
UTM parameters get attached,
then this would be counted as a new
reload, and so the reload is false.
So this is
already pretty convenient that we can now detect our reload with this custom JavaScript
variable.
Now, when would this actually be
useful.
For example, if you have conversion codes firing, if you don't want to fire again, on
a page reload as an example, let me go
through a conversion here.
And we go to get to order received page.
Now on all the receipts page, I've already fired some tags.
These
are Adwords, Facebook, and Google Analytics conversion tags, and transfer the information
to our tools.
Now notice that these all fire
on the page view event.
So once I reload this page,
they actually fire again.
Now some systems are smart enough to pick up that there's
a same order ID number being sent over, being transferred to the tool, they will automatically
deduplicate this order.
So you won't get
double orders in your systems.
But some systems are not as smart.
And we'll just produce double orders if a user clicks on the reload
button.
This is particularly true when you are fine with a very simple trigger, like the page
view event if the order is received, and
you're not sending any special information over to the system.
So cannot really decide whether this is a duplicate transaction or not.
And therefore, it would be good if we could stop these tags based on our variable inside
of Google Tag Manager.
So let's try this out.
Let's look at the trigger that is set up for these tags.
It's always the same trigger, it's a page view transaction trigger.
And it
fires on the condition that the page path contains order received.
So far, that's all well, but we could add our just build custom
JavaScript reload variable to check whether it contains or is equal to false.
So only if these two conditions turn positive.
So a user
is on the order receive page and the reload his false, we want to fire our tag.
Simple as that.
Let's try this out.
Refresh.
And if I go
to our checkout page, order received, reload this
our tags don't fire because our variable
custom js reload turned true.
Let's do a
negative example here.
I'm going to go through another order.
And once I enter the page order received, for the first time, I get my
conversion codes fired, and the data is transmitted.
And if I reload this page,
again, our code shouldn't fire because we have been
reloading our page.
So really a simple solution to prevent duplication of any tag firings.
You could use this in different other
instances.
For example, if you really don't want to fire a tag two times because it will inflate certain
numbers, a certain event, then
you might want to check for this reload variable.
And if it turned true, you don't want to fire your tags.
That could be for example,
if you want to be really accurate with your page views, or prevent any kind of events
that shouldn't fire if the page has reloaded.
I
could also think of the use case that you would explicitly track when somebody reloads
the page.
So you could fire an event if this
actually turned true, just to see which pages get reloaded a lot by the user to maybe install
an auto refresh functionality or figure
out why the user would like to reload this page.
Maybe there's something wrong on the page itself.
All right, so there you have it.
This
is how you can detect whether the user clicked on the reload button and landed on this page
to the back or reload button and prevent
your tags from firing.
Now if you try this out, then I'd love to hear from you what are your experience.
Leave them down below.
And if
you have any more questions also leave down below.
Now if this video have jobs in the end, and I'd love for you to click that like
button and
also, subscribe to the channel
because we bring you new videos just like this one every week.
Now, my name is Julian.
Till next
time.
For more infomation >> How to Prevent Tags from firing after a Page Reload with Google Tag Manager - Duration: 13:20.-------------------------------------------
Was kann das Such Werbenetzwerk von Google? [Frag Bloofusion #10] - Duration: 3:12.
-------------------------------------------
Ancient Aliens: Baba Vanga (Season 12, Episode 10) | History - Duration: 5:10.
-------------------------------------------
The Lushing: Lush Halloween 2018 - Duration: 0:25.
(suspenseful music)
- [Both] Hello LUSHie.
(dramatic music)
Come bathe with us.
Forever.
-------------------------------------------
Cream: Lush Halloween 2018 - Duration: 0:49.
(slow suspenseful music) (water rushing)
(phone ringing)
- Hello.
- [Man On Phone] Can I ask you a question?
- Who is this?
- [Man On Phone] What's your favorite LUSH product?
- (chuckles) Who is this?
- [Man On Phone] Tell me your favorite LUSH product, Hayley.
- This is Sydney, I think you have the wrong number.
- [Man On Phone] Oh really, sorry.
- That's okay, bye.
(phone ringing)
- Hello.
- [Man On Phone] Hello, Sydney.
(dramatic music) (screams)
-------------------------------------------
The Hair Witch Project: Lush Halloween 2018 - Duration: 1:04.
- Hey everyone,
I just got back (sniffing) from my local Lush,
where I (sniffing) picked up some of the exciting
spooky Halloween products that just launched.
Here they are.
(sniffing) This one is called Bewitched,
and it's the cutest little bubble bar that I've ever seen.
(sniffs) And it smells so good
(creaking)
(scared breathing)
There's also something really exciting I wanna show you.
(sniffs) It's the Ghost in the Dark soap.
Its amazing, super spooky. All about spooky this Halloween.
(thud) (spooky music)
(scream)
(scream) (ball rolling)
- [Spooky Guy] (sniffs) Wow, that's awesome.
Sydney can I use this?
Man, I'm gonna go draw a bath.
-------------------------------------------
Shyco: Lush Halloween 2018 - Duration: 0:55.
(slow suspenseful music)
(metal clanking)
(water pattering)
(frightening music)
(screaming)
- Sydney, what are you doing, get out.
- Halloween just launched at LUSH.
New naked shower gels.
- Cool, but, boundaries Sydney, boundaries.
- Just thought you wanted to know.
-------------------------------------------
IGO - Lần Đầu Dắt Dương 2k1 Đi Phố Lồng Đèn - Duration: 12:21.
-------------------------------------------
It's Almost Impossible Not To Love A Ragdoll Cat - Duration: 2:58.
-------------------------------------------
Box of Toys Military Toys Toy Guns for Kids Toy Weapons Army - Duration: 7:17.
Box of Toys Military Toys Toy Guns for Kids Toy Weapons Army
-------------------------------------------
The Friendship Song With Bob The Train | Songs For Children by Kids Tv - Duration: 22:10.
The Friendship Song
-------------------------------------------
Hot Cross Buns | Nursery Rhymes Cartoons for Children | Videos for Babies by Little Treehouse - Duration: 1:24.
Hot cross buns,
Hot cross buns,
One a penny,
Two a penny,
Hot cross buns.
If you have no daughters,
Give them to your sons,
One a penny,
Two a penny,
Hot cross buns.
Hot cross buns,
Hot cross buns,
One a penny,
Two a penny,
Hot cross buns.
If you have no daughters,
Give them to your sons,
One a penny,
Two a penny,
Hot cross buns.
-------------------------------------------
Inspections for nuclear, missile site dismantlement and declaring end to Korean War at core.. - Duration: 2:12.
After months of deadlock, nuclear negotiations between North Korea and the U.S. are back
on track.
Mike Pompeo's expected to visit the regime next month... and another Pyeongyang-Washington
summit is officialized.
Oh Jung-hee sheds light on the expected discussion topics by the two sides.
Last week's inter-Korean summit declaration stipulates... that North Korea will allow
experts to oversee the dismantlement of its Dongchang-ri missile engine test site and
launch pad.
It also says, if Washington takes "corresponding measures," Pyeongyang is also willing to dismantle
for good its Yeongbyeon nuclear complex -- the regime's key nuclear site that's home to plutonium
production facilities and a uranium enrichment plant.
With U.S. Secretary of State Mike Pompeo soon visiting North Korea for the fourth time to
lay the groundwork for the second Kim-Trump summit,... it's believed North Korea-U.S.
nuclear negotiations will now revolve around how the dismantlement of Dongchang-ri and
Yeongbyeon will take place... and what Washington can offer in exchange.
"If Secretary Pompeo visits North Korea, or Pyeongyang and Washington start communicating
through their channel in Vienna, then the key focus will be on how certain nuclear facilities
and weapons systems can be dismantled... and how that dismantlement can be verified.
Also tied in with this will be when the two sides could declare an end to the Korean War."
The 'corresponding measure' North Korea wants the most from the U.S. is a declaration of
an end to the Korean War.
That, despite being only a political declaration -- not a treaty -- helps end hostilities between
the two sides, while opening the possibility of establishing diplomatic relations.
The two Koreas aim to declare an end to the Korean War within this year and Washington
is not so opposed to it.
But that still remains to be seen... as the U.S. has not made any official mention of
it after the inter-Korean summit last week... and for now, wants to first see North Korea
take concrete steps towards denuclearization.
Oh Jung-hee, Arirang News.
-------------------------------------------
Jeep Wrangler MasterTop Soft Top Protection Window Roll (1987-2018 YJ, TJ,,JK & JL) Review & Install - Duration: 6:56.
This MasterTop soft top protection window roll is for those of you that have a 1987
all the way through the most current model of your Wrangler that are looking for a way
to protect your windows when they're removed from your soft top.
Of course, if you have a soft top, you probably like to pull the windows out, put the top
down.
But we all know if you just throw the windows anywhere, they can get scratched up and it
can become hard to see through as well as a little bit ugly.
So a protection piece like this is going to be a pretty good idea for you.
This is going to be something very, very easy to use.
If I had to rate it, I would definitely say one out of three wrenches.
Very, very simple.
And I'm going to show you how to use it in just a second.
So this is going to be something that allows you to roll up your windows into a nice compact
roll here.
It does have almost like a soft top material on the outside.
But on the inside, it has a very nice soft, felt-like material, and there are multiple
layers of that.
So you can put one between each of the three windows that you're going to be putting in
here to ensure that they're not going to scratch against each other, even if they do have a
little bit of dirt or some sort of grit on them.
Of course, if they're completely covered in dirt, you're not going to be putting them
in here.
But if they are a little bit dirty between the last time you washed your Jeep and this
time, you're not going to have any of that chafing which can happen in some of the other
options that are out there.
Now, if you're looking for window protection, you're really going to find two different
options.
One is going to be a roll like this and the other is going to be a larger carrying bag,
essentially.
And those bags don't require or even allow you to roll your windows, so they're going
to be much larger.
The benefit to one of those is that you can very easily carry the bag around, take the
window out, slide it inside the bag and then hang the bag up in your garage, lay in a corner
somewhere, put it inside your Jeep, whatever you want to do.
While this is going to be much more compact, the only downside, if you want to call it
that of something like this, is you need to have a large area where you can lay this thing
out.
You can flip the felt back where it's not going to be getting dirty, picking up a bunch
of stuff that is going to scratch your windows, and then put the windows in one after the
other, and then roll this up.
So it does take a little bit of space to be able to get it to this point where it is nice
and compact and easy to move around.
So just something to keep in mind, this versus some of the other options out there.
Now considering this versus a couple of those other choices, this is going to be a little
bit more moderately priced than some of the others.
This comes in at right around $70, and I do think that is going to be worth it.
When you consider the price of replacing the windows in your Jeep, this is going to be
significantly less expensive than that.
And, like I said before, even less expensive than some of those other protection bags that
are going to be a little bit larger.
So if you're looking for something that allows you to roll your windows into a nice compact
shape like this, I do think this is going to be a pretty good choice at a pretty fair
price.
So, like I said before, now I'm going to show you exactly how to use this protection roll.
So, like I said before, this is very very easy to use.
It's really designed for you to put the windows in and out of on a regular basis, so they
make it very, very simple.
One out of three wrenches.
Not really in installation, but again, very, very simple.
So I'm going to show you exactly how to use it.
Obviously, you can see we have all three of the windows out of the Jeep behind us.
And the only thing we really have to do to the windows to be able to use this storage
bag is remove the tailgate bar from the back window.
Now, this is a universal fit item.
This is going to work for anything from a YJ up to the current JL and any new generations
that come after.
So this process may be a little bit different depending on which generation you're working
with.
But for most gens, you can really just slide the tailgate bar right off the window.
This is going to have to get stored separately in another location.
But once you have that tailgate bar removed from the windows, you're really ready to go.
So what we're going to do is just unfold the storage bag.
Just a little bit of room there.
And as you can see on the inside of the bag here, you're going to have a couple of Velcro
straps.
You're going to want to go ahead and release those.
And then you're going to have the soft felt material.
That's what's going to go between the windows to keep them from scratching each other.
So you'll pull all of the felt to the one side, and then we'll go ahead and pop our
first window into the storage bag.
We're going to start with our rear window.
Slides right into place and we'll fold one layer of the felt material overtop of it.
Tuck the edges underneath here just to make sure everything's nice and neat then we'll
pop our next window in.
And, again, fold the next layer of felt overtop.
Finally, the second slide window.
Same thing.
And the last layer of the felt.
Now there's Velcro straps that we undid in the beginning.
We can go ahead and reattach those across the top.
And then, finally, roll everything up.
Starting with, whichever end you want, we're going to start over here where the felt is
actually attached on to the storage bag here.
We'll just roll everything up nice and tight.
Once you're finished rolling up your window storage bag, you can use the included straps
to ensure that everything stays rolled up.
So if you're looking for a way to store your windows in a nice, compact roll, and a way
to protect them from scratching as well, I would recommend this option for MasterTop.
And you can find it right here at extremeterrain.com.
-------------------------------------------
Tail-end Charlie and the Junkers Ju 87 Stuka Pilot. A WWII Story - Duration: 5:47.
-------------------------------------------
First Alert Weather - Duration: 2:11.
-------------------------------------------
Morant Bay, St Thomas, Jamaica - Duration: 10:22.
Driving east from Belvedere
Morant Bay Round About
<<< To Seaforth / Reggae Falls
<<< Summit Road
St Thomas Parish Court >>>
<<< Morant Bay Bus Terminal
To Church Corner >>>
<<< Queen Street - To Morant Bay Town
Rudolf Elder Park (Morant Bay Park) >>>
Wharf Road
Morant Bay Plaza >>
<<< East Street
St Thomas Farm Store >>>
<<< South Street
<<< Morant Villas
<<< To Morant Bay Town
<<< To Morant Bay High School
<<< Highbury Close
<<< Falcon Crest Guest House
-------------------------------------------
Bí Mật Về Điểm Huyệt I Khoa Học Huyền Bí - Duration: 6:53.
Hey guys, it's Mike Chen.
Kungfu, Qigong, martial arts
these are topics I'm really interested in
because ever since I was little I have always wanted to be a martial art superhero.
And the reason I was so fascinated with kung fu and martial arts and Qigong is that
I feel like there's still so much about these age-old fighting arts
that we have yet to fully understand
and because of this some aspects of ancient martial arts are sometimes painted
as mysterious and a mystical because they teach certain skills
that don't always seem physically possible at first glance.
Sometimes these skills involve breaking through layers of bricks
or the ability to bend a sharp spear with your throat.
Or it could be lethal techniques that
demand focus, determination in years of training in order to master them.
And the secrets behind them are passed down to a very select few of one generation to the next.
And one of these lethal techniques
that dances between reality and fantasy is known as the touch of death.
And that we're gonna be talking about in this video.
The touch of death goes by many names,
in China it is known as the Dim Mak.
While in Japan a fighting style involving pressure point fighting
is referred to as Kyushojutsu,
Also called death point striking, this deadly martial arts technique when done right
could potentially kill an opponent by striking a specific area of the body
with a simulate gentle but a devastating critical force.
Now the Chinese term Dim Mak literally translates in English
to which suggests that this technique requires applying pressure to an artery in order to work.
And according to martial artists who claimed they know how to use this lethal move,
this technique has a delayed effect when used.
So at first this strike may seem harmless,
but an individual could suddenly died from it
without notice several weeks or even months later.
So what is the origin of the Dim mak?
Well, the use of the touch of death
had been largely mentioned in Wuxia literature
or Chinese martial drama comics.
In these stories the Dim mak painted as a highly specialized fighting style
which involves targeting the pressure points of enemies
and disrupting the flow of their Qi or life energy.
And in these literary works
those who were attacked with this method
would end up paralyzed or dead whether immediately or delay.
Now in reality the history of Dim Mak can be traced back to traditional Chinese medicine,
particularly acupuncture.
Though there are also suggestions
that it was developed by the same person who created the Chinese martial arts Tai Qi.
It is also believed that the deadly art of Dim mak largely influenced the philosophies
and development of other Chinese martial arts
and even those combat disciplines that originated in Korea and Japan.
Though the death point striking move is noted by some people
to have played a crucial role in the spread of martial arts across the globe,
the knowledge of how to use this fighting style remains largely unknown.
Supposedly only a few chosen martial artists are trusted by even fewer masters to learn this technique.
Which is why it has managed to remain a heavily guarded secret.
However in recent years, more and more self-proclaimed martial art masters
have stepped into the limelight, proclaiming their knowledge about the Dim mak
and their ability to use it.
And among the numerous martial arts masters
who reveal their intimate knowledge of the death touch technique
is karate instructor Jorge Dillman.
In the 90s Dillman created a fighting style inspired by Kyushojutsu.
And not only did he claim that he knew how to use the touch of death in combat,
he also revealed that he was able to develop Qi based techniques
that did not require coming into contact with his opponents.
However a study of his fighting techniques by experts and skeptics
concluded that his proclamations were really fraudulent.
Another martial artist who claimed to be a master of Dim mak is Erle Montaigue,
He even released books and videos about the technique around the 1980s,
heralding himself as the first Western master in the art of Tai Ji Quan or Tai Ji.
He also disclosed that he learned from several Chinese martial arts masters
on how to use the death point striking technique as well as other fighting maneuvers
that disrupted Qi inside the human body.
Like Dillman, though the majority of the public were really not so inclined to believe him.
So is the touch of death really real?
With individuals revealing themselves to be practitioners of this mysterious and controversial technique,
what I really can't help but wonder
if the touch of death is indeed the real deal
Those who believe in the existence and effectiveness of the Dim mak
used a death of Bruce Lee as an example
of how lethal this martial arts technique truly is.
Of course this accomplished martial artist
and film superstar was revealed to have perished from cerebral edema
and his demise officially classified as a death by misadventure
due to a deadly reaction to combine medication.
However speculation suggests that his sudden death was a delayed effect of a Dim Mach strike
from a fellow martial arts master
who was ordered to eliminate him.
Of course but there is no proof to such rumours
but even years after Lee's untimely death, many still found it very suspicious
that he died so suddenly and at a relatively young age.
It was also widely known that he had his fair share of enemies
within the martial arts community during his short life.
But for now, though we really don't have enough scientific and historical evidence
to say with absolute certainty that the touch of death is indeed an effective and deadly technique.
What we do know is that subjecting certain areas of the human body
to immense pressure or trauma
can result in unexpected scales of damage or injury
to the person attacked sometimes even death.
A good example of this is a condition known as commotio cordis.
And it may seem like something plucked out of a movie
but there are incredibly rare instances
wherein a person can actually die after receiving a blow to the chest.
And this could happen if the strike lands at a critical moment
while the heart is beating.
The blow could disrupt this rhythm and results you to cardiac arrest.
Even with medical intervention,
this lethal condition has a fatality rate around 65 percent.
Another real-life medical example similar to how the dim Mak strike works
is by blocking the blood flow to the brain via the carotid artery,
applying pressure to this common artery
will not only result to consciousness,
but it may also lead to brain damage.
But with that said even to this day the touch of death remains a very curious mystery.
But I do know some people who have mastered it or a variation of it.
You know like Spock with this nerve pinch
or Doctor Who with his Venusian Aikido
oh and Kung Fu Panda with his Wuxi finger hold.
But in all seriousness do I believe that this technique is real?
I personally do because as we all know the body is a still a huge mystery.
And Eastern medicine and combat and martial arts deals so much with certain pressure points.
And when this is brought up nowadays a lot of people kind of laugh at it.
For example in Chinese medicine there's acupuncture which really relies on pressure points
and arteries and energy channels to heal the body
and I find it really annoying that some people nowadays
when you bring up acupuncture they consider like like a Frankenstein science,
like something kind of crazy.
But that's literally how Chinese doctors were effectively healing sick people
for thousands of years.
So yeah I do feel like there are a lot of things about the body that we don't understand.
So could there be a technique where I hit somebody
and the specific points with a certain degree and pressure
that they go off and die after a couple months.
Hey, why not? Let me know what you guys think in the comments below.
Thank you all so much for watching this video, I'll see you later
Không có nhận xét nào:
Đăng nhận xét