Thứ Tư, 12 tháng 9, 2018

Youtube daily Sep 12 2018

In this video, I'm going to show you how you can start a timer trigger based on the interaction

of a user.

All and more coming up.

Hey there, welcome back to another video of measureschool.com teaching you the data-driven

way of digital marketing.

My name is Julian.

And today we want to talk about the timer trigger.

Now the timer trigger something that is built-in to Google Tag Manager.

I don't often use it, because you can really just utilize it when a user comes to the page,

start a timer, and then after a few seconds, you can fire your tag.

So the use case is really limited because we cannot control when the timer trigger actually

starts.

So today, I want to show you a workaround where we're going to build our own timer trigger

that we can start based on the interaction of the user.

That is particularly useful if you will have, for example, some message that you send off,

and then an error or success message appears after two seconds.

You want to start the timer, and then check the element if there is a success or error

message.

That's exactly what we're going to do today.

And we got lots to cover.

So let's dive in.

For a little demo.

Here, I have found a CodePen by Immanuel who has come up with this little send button here

that either shows a success or an error message after two seconds if we click it.

Now, I've modified this a little bit to build in Google Tag Manager.

And when I click the Send button, you see I've already built in a click trigger that

gives us this event here.

Now, our case here is we want to detect whether there's an arrow or success message after

we click the button.

But obviously, as you see, it takes a while for the success or error message to display.

It's actually two seconds to be exact.

Now, you could take this as an example of sending off a request, sending of a validation

getting something back from the server, which just takes a while.

You wouldn't actually know, but approximately, you know, the time that it would take till

the user gets shown the error or success message.

So how can we track this with Google Tag Manager?

Just to demonstrate, if we would use the built-in time a trigger here,

let's go over and build one of these timer triggers down here.

We can set up the event name that should be pushed into the data layer the interval, so

that would be the time in milliseconds.

In our case, let's go with 2.5 seconds.

And the limit how often it should repeat counting.

In our case, just one.

And then you need to choose the condition when it should be deployed.

In our case, when the page hostname contains code pen, that should be fine.

And you'll fire this on all times for now.

Let's saved this and refresh.

Go back to our page.

And we see the problem after two seconds, we have our GTM timer in here.

But we have no way of starting the timer again or having it start on an interaction.

The only interaction that we can start this one is the actual page view.

So once this event loads, the GTM timer will start counting.

Not very useful in our case, because we never know when the user will actually click that

send button.

So we need to come out with a little workaround.

First of all, we want to get the actual text of the button.

And normally, you would do this via a click variable that you have maybe activated.

But in our case, it wouldn't show anything as when we click on this button, the success

or error message is not yet shown.

So we would need to use a different technique.

Luckily, we have a variable available for this, which is the DOM element variable.

So let's come figure one.

And the user-defined variables.

We'll go with our DOM element variable right here.

And we would need to select the ID or a CSS selector.

Now let's look at our button in the developer tools.

And we can see we are lucky we have an ID.

In most circumstances, you probably would use the CSS selector.

But for our case, we could go with an ID, we just need to enter the ID which is a request.

And we don't need to enter an attribute name, the attributes are right here because we want

to get the actual text right here, which is the default if you don't enter any attribute

name.

So we are fine on this side.

Let's give this a name

and save this and see what it says.

So go back to the page reload.

And we should see in our events right here

at the timeout, for example, that our button text is now sent.

Really on any other event, it would also be sent.

Now if I click this button,

we have our GTM click.

And we look into the variables and we still see the Send, which is unfortunate, because,

at a later point, we actually want to reject this variable and exactly after two seconds,

we want to reject that variable to see what the contents actually is, is it an error or

is it a success.

So now is where we can build our own timer trigger with the help of a custom HTML tag.

It's pretty simple, really, we just need to fire a tag that waits two seconds, and then

deploys a data later push.

So let's go over to tags and configure this.

We'll go with a new custom HTML tag,

where we're gonna write in some JavaScript.

So we'll put this into a script tag.

And we can use the built-in JavaScript function, which is set timeout.

Now, this takes two parameters, one is a function that should be executed, and the other is

the time in milliseconds.

So when do we want to check this?

Again, I will go with 2.5 seconds.

Now inside of this function is where the magic happens.

This is the code that we want to deploy after 2.5 seconds.

In our case, we just want to have a data layer event so we can recheck our variable.

Easy as that we just push something into the data layer

with our normal push command.

And the data that we want to push the data layer is an event with the key GTM timer.

We could name this anything else.

But GTM timer will do for now.

The best practice is to always wrap your custom JavaScript in an IIFE.

Now an IIFE is an Immediately Invoked Function Expression, which ensures that you don't pollute

your global namespace.

Really something that you should wrap your custom JavaScript inside of your custom HTML

tags in.

For this JavaScript, it wouldn't actually be so bad.

But as a best practice, I always put my custom HTML in an IIFE.

Now, let's give this a name.

This is simply a listener for our two-second timer and a trigger.

Now the trigger is simply the button click, that's when we want to start the timer.

So we'll choose our click trigger

and save this,

Do not get mixed up.

Let's get rid of our timer trigger

and refresh our preview and debug mode.

Refresh our page

and no timer is firing.

If I click Send, we have our GTM and click and two seconds later, we should have our

GTM timer in here.

So we have a new event where we can definitely check our variables and see what button tags

is.

It's error, and therefore, we could send it back to our tracking tools, such as Google

Analytics, or use that in our variable.

Let's make an example of that.

First of all, let's build a trigger for this event.

This would be a custom trigger

on our two second timer.

All right, let's use our custom event here with just simply enter our GTM the timer event

that we had in our data layer.

And we only want to turn this trigger true when the dump button text contains success.

Let's save this.

And now we can use that trigger to fire a tag.

Now, just for an example.

Let's go with a Google Analytics tag.

So be an event tag

with

successful

button click.

All right, we'll go with an event and

button click

and success.

We still need a tracking ID.

And just for a test that should do it.

That's good.

Our trigger setup,

save this and refresh

our page

and send this off.

We have our GTM timer, and our tag doesn't fire.

Now if I click again,

we get a success message and our Google Analytics event Successful button click has been deployed.

So this is how you can get around the GTM timer only firing on the page view by building

your own listener.

I'm also going to link up the HTML down below.

Don't forget, if you want to have this live on your website, you need to submit this as

a version so it goes live on your website.

All right, so there you have it.

This is how you can build a timer trigger based on the interaction of the user and it

actually started when the user clicked on the button.

Now you might be asking yourself, why didn't he used the element visibility trigger?

Fair question.

In this case, I would definitely use the element visibility trigger and try it out and see

if it works.

But I have encountered some cases where our client's websites, the appending of the new

DOM element actually happened and the element visibility trigger wasn't able to pick that

up.

In this case, it would be useful to actually have such a time a trigger that can wait for

certain given time after a user has done his interaction and then check the DOM and that's

what we did in this video.

So I hope this was useful to you and you encounter such a case at some point and then think back

to that GTM timer trigger that we have built today.

Now love to hear from you.

Do you have any more questions?

Leave them in the comments down below.

And as always, if you like this video, give us a thumbs up and also subscribe to this

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 Build Your Own Event Driven Timer Trigger in Google Tag Manager - Duration: 11:38.

-------------------------------------------

Magic Picnic Food Story for Kids from Steve and Maggie | Free Speaking Wow English TV - Duration: 7:04.

For more infomation >> Magic Picnic Food Story for Kids from Steve and Maggie | Free Speaking Wow English TV - Duration: 7:04.

-------------------------------------------

Does Tea Tree Oil Have Hormonal Side Effects? - Duration: 4:36.

For more infomation >> Does Tea Tree Oil Have Hormonal Side Effects? - Duration: 4:36.

-------------------------------------------

Kdo doopravdy jste? | TEST OSOBNOSTI - Duration: 7:05.

For more infomation >> Kdo doopravdy jste? | TEST OSOBNOSTI - Duration: 7:05.

-------------------------------------------

Trung Quốc Không Mạnh như Ta Nghĩ? | Trung Quốc Không Kiểm Duyệt - Duration: 8:04.

On this episode of China Uncensored,

some really anti-China things are being said, by...

China?

Welcome back to China Uncensored,

I'm your host Chris Chappell.

What do you think of when you hear "China"?

Hopefully—China Uncensored, starring Chris Chappell.

But our budget is a long way from what the Chinese Communist Party spends.

They're spending $10 billion dollars a year to make sure that you love China.

What are they buying with those 10 billion dollars?

Why, all sorts of things!

Especially articles and videos that help you

focus on all the amazing things China's glorious leaders have accomplished,

because, you know, China gets things done.

For example, they have this newspaper section called China Watch

that looks like articles, but is actually paid propaganda.

And then they pay American newspapers

to put them in as advertisements.

And combine things like that with operating American TV News channels,

and buying influence in Hollywood, and eventually you get

American media publishing their own articles praising the China model.

But right now, it seems the Communist Party wants you to hold on a sec,

because China isn't really all that great.

You see, Americans have been seeing all the propaganda for years,

and a lot of them are now really worried that China

is some kind of super powerful,

existential threat to the world.

That it's flooding the US with spies.

Or secretly building up the largest military in the world.

Or that China is a strategic competitor of the US.

Haha, couldn't be further from the truth.

Really, there's no way China could be doing all that.

I mean, the US is still number one, China can't compete.

And that, ladies and gentlemen,

is the new message from the Chinese regime's propaganda machine.

This People's Daily editorial says calling China "the world's first"

or "number one in the world"

"could easily make people misunderstand or even misjudge" China.

China's US Ambassador Cui Tiankai said at a recent meeting,

"China has no intention to challenge the international standing

and interests of any other country

or the existing international order and system."

A professor at a top Chinese University said,

"The trade war has made China more humble.

We should keep a low profile."

And my favorite state-run media the Global Times ran this story.

Tsinghua is another top Chinese university.

Apparently one professor there had said in a speech,

"China has overtaken the US in all respects."

And so then over 500 alumni signed a petition to have him fired.

Why?

Well, the petition said his view "opposed common sense."

Are you surprised by this new tone?

Don't be.

Because as that alumni letter said,

the problem with all the "China is number one" talk,

is it "raises the vigilance of other countries."

The US has been kind of catching on to the fact the Chinese regime

is actively engaged in a variety of tactics

to infiltrate and undermine the West.

And that's a problem for the Communist Party

because it means the US might start doing things like,

oh I don't know...starting a trade war.

So China's Propaganda Department had switched tactics.

At least, externally.

Instead of articles like this from the People's Daily in 2015...

Now, we're seeing articles like this.

It's a strategy more like something former paramount leader Deng Xiaoping

once said: "Hide your strength, bide your time."

It's like, if there's an arm wrestling contest coming up,

you don't want to start walking around without a shirt if you're this guy.

So depending on what the strategy of the day is,

state-run media can do a complete 180 on the image of China.

For instance, at the beginning of the year,

China said it was battling to become a top economic power.

But now, China is still a developing economy…

And it "has a long way to go before it becomes a 'developed economy.'"

Wow, what a difference a few months make!

You see, the Chinese Communist Party likes to make itself look all powerful.

Except when it wants to make itself look weaker than it actually is.

Because as the People's Daily also recently put it,

"China has returned to the center of the world stage...

Such a large size, such a heavy thing,

can't be hidden by 'being low key,'

...just like an elephant can't hide behind a sapling."

And that's the message state-run media wants Chinese people to hear.

Because while the Chinese Communist Party is starting to

downplay its ambitions to the outside world,

inside China, it's actively promoting nationalism

in a way that would make Mussolini blush.

Like this recent documentary,

translated in English as "Amazing China",

but actually is closer to "my country is awesome."

See?!

See how awesome?!

Endless hours of footage awesome!

And it was a smash hit!

Brought in 42 million dollars.

Biggest documentary in China ever.

Partly because people were required to watch it.

That is one way to boost ticket sales.

Although it didn't do quite as well as the American documentary

about how America is awesome.

Which made 52 million dollars.

That was a documentary, right?

Anyway, besides telling Chinese people how awesome China is,

the internal propaganda has another message:

If China can't compete, that's because

"China [has] suffered a century of humiliation

at the hands of foreign powers."

But if Chinese state-run media is changing their tone,

does that mean that the Chinese leadership

is actually changing their strategy?

Do they care more now about international cooperation

than becoming a top economic power?

I'm going to go with no.

So what do you think about the Communist Party's propaganda about-face?

Leave your comments below.

And before you go, now is the time when we answer questions

from fans who support China Uncensored

on the crowd funding website Patreon.

Largezo asks,

"If nothing is done to curtail China's influence

and intellectual property theft will the PRC rule the world

come mid-century?"

I mean, what gave you the idea that the PRC

was looking to become a global superpower?

It can't compete.

But if it were, it might start doing things like,

make their own computer chips.

Or build their own Internet

And compete with America's GPS network.

All the core tech components a super power needs that China...

didn't really have a few years ago,

but in a very short time, suddenly, they do…

Strange.

So the People's Republic of China definitely

wants to rule the world by mid century.

But will they?

Well Largezo,

you asked "if nothing is done to curtail China's influence"

and I think what we're definitely seeing is the beginning of

other countries trying to curtail China's influence.

Or at least waking up to it.

So I don't think it's going to be as easy

for the Chinese Communist Party

as it has been so far.

But whether they will succeed in ruling the world largely depends on

how quickly other countries will act.

Thanks for you question.

And if you'd like to hear me answer your question on the show,

become a member of the China Uncensored 50-cent Army

by contributing to the show on the crowd funding website Patreon.

The link is below,

or click the orange button during the end credits.

Thanks again for watching this episode of China Uncensored.

Once again I'm your host Chris Chappell,

see you next time.

Why let the Communist Party manipulate what you think about China?

Let China Uncensored do it!

If you haven't already,

subscribe to this YouTube channel.

And be sure to turn that notification bell on

so you're notified when we have new episodes.

They come out every Monday, Wednesday, Friday,

and sometimes even Saturday.

For more infomation >> Trung Quốc Không Mạnh như Ta Nghĩ? | Trung Quốc Không Kiểm Duyệt - Duration: 8:04.

-------------------------------------------

Toy Weapons Box of Toys Toy Guns for Children Military Toys - Duration: 11:21.

Toy Weapons Box of Toys Toy Guns for Children Military Toys

For more infomation >> Toy Weapons Box of Toys Toy Guns for Children Military Toys - Duration: 11:21.

-------------------------------------------

ASMR Eating "SEA GRAPES vs. ALOE VERA x SEAWEED" Challenge Mukbang Party - Duration: 15:15.

ASMR Eating "SEA GRAPES vs. ALOE VERA x SEAWEED" Challenge Mukbang Party

For more infomation >> ASMR Eating "SEA GRAPES vs. ALOE VERA x SEAWEED" Challenge Mukbang Party - Duration: 15:15.

-------------------------------------------

Las Noticias de la mañana, miercoles 12 de septiembre de 2018 | Noticiero | Telemundo - Duration: 7:09.

For more infomation >> Las Noticias de la mañana, miercoles 12 de septiembre de 2018 | Noticiero | Telemundo - Duration: 7:09.

-------------------------------------------

New BMW G310RR Sportbike Launches 2019 | Mich Motorcycle - Duration: 2:06.

For more infomation >> New BMW G310RR Sportbike Launches 2019 | Mich Motorcycle - Duration: 2:06.

-------------------------------------------

Homescapes Level 1002 - How to complete Level 1002 on Homescapes - Duration: 3:13.

"How to beat level 1002 on Homescapes"

"How to complete level 1002 on Homescapes"

"Homescapes"

For more infomation >> Homescapes Level 1002 - How to complete Level 1002 on Homescapes - Duration: 3:13.

-------------------------------------------

First Alert Weather - Duration: 2:22.

For more infomation >> First Alert Weather - Duration: 2:22.

-------------------------------------------

Daru Badnam | Raj Mawer | Joginder Kundu | New Haryanvi DJ Song 2018 | Haryanavi Songs - Duration: 3:22.

Daru Badnam - Ansh Motion Pictures

Haryanvi DJ Song 2018

Ho Kade Kadar Main Pe Lu Su

Roz Peen Ka Aadi Na

Karke Chalu Ram Ram Nu

Chora Main Albadi Na

Jid Kar Bethe Yaar Maire

Maine Yuhi Peeni Padgi

Kade Hodi Pe Kade Poli Me Mere Daru Chadhgi

Kade Hodi Pe Kade Poli Me Mere Daru Chadhgi

VRaj Bandhu

For more infomation >> Daru Badnam | Raj Mawer | Joginder Kundu | New Haryanvi DJ Song 2018 | Haryanavi Songs - Duration: 3:22.

-------------------------------------------

Virginia Traffic Updates & Road Conditions for Hurricane Florence | Heavy.com - Duration: 2:34.

Virginia Traffic Updates & Road Conditions for Hurricane Florence | Heavy.com

Google Maps With Virginia's emergency site routinely crashing, here's how to stay up to date on road conditions and traffic updates as Hurricane Florence looms.

Virginia is one of three states that has declared a state of emergency for Hurricane Florence, a category 4 hurricane that's estimated to make landfall late Thursday night.

For those Virginia residents looking to evacuate prior to the hurricane's landfall, here's what you need to know about traffic updates and road conditions as of Tuesday, September 11.

Standstill Traffic Expected on 64-W Throughout the Day.

One of Virginia's major highways, 64-W, has been extremely congested throughout the day, with hundreds of Twitter users reporting dead-stop traffic.

Similarly to North Carolina, 64-E will be shut down at noon on Wednesday in favor of two lanes allowing western-bound traffic, which should alleviate some of the congestion.

As of Tuesday,  VDOT has lifted lane closures on interstates 64 and 664.

Additionally, High Occupancy Toll lanes on I-64 will run in the westbound direction throughout the local emergency, regardless of occupancy in the vehicle.

For Now, Only 'Zone A' Residents Required to Evacuate.

For now, only residents in Zone A for Virginia are advised to evacuate, though those in Zones B, C and D should stay on top of updates by the Virginia Department of Emergency Management.

For more infomation >> Virginia Traffic Updates & Road Conditions for Hurricane Florence | Heavy.com - Duration: 2:34.

-------------------------------------------

So cool rap beat! 🎃 Royalty free song for videos 🎃 Push buttons! :-) - Duration: 2:02.

Cool rap beat for you! This is elegant royalty free song for videos.

For more infomation >> So cool rap beat! 🎃 Royalty free song for videos 🎃 Push buttons! :-) - Duration: 2:02.

-------------------------------------------

Stunt Master "Tiger Shroff" Ko Bhi Action Scenes Keliye Karni Padti Hai Practice - Duration: 2:18.

Stunt Master "Tiger Shroff" Ko Bhi Action Scenes Keliye Karni Padti Hai Practice

For more infomation >> Stunt Master "Tiger Shroff" Ko Bhi Action Scenes Keliye Karni Padti Hai Practice - Duration: 2:18.

-------------------------------------------

Hoda Kotb Lifestyle 2018 ★ Net Worth ★ Biography ★ House ★ Cars ★ Family - Duration: 3:06.

Hoda Kotb Lifestyle 2018

Hoda Kotb Lifestyle 2017

Hoda Kotb Lifestyle

Hoda Kotb

Hoda Kotb 2018

Hoda Kotb weight

Hoda Kotb Profession

Hoda Kotb Family

Hoda Kotb father

hoda kotb mother

hoda kotb partner

hoda kotb daughter

hoda kotb family 2018

hoda kotb house

hoda kotb income

hoda kotb net worth

hoda kotb funny

hoda kotb cars

hoda kotb tv show

hoda kotb facebook

hoda kotb twitter

hoda kotb instagram

For more infomation >> Hoda Kotb Lifestyle 2018 ★ Net Worth ★ Biography ★ House ★ Cars ★ Family - Duration: 3:06.

-------------------------------------------

Cock A Doodle Doo | Cartoon Nursery Rhymes for Babies | Kindergarten Kids Song by Little Treehouse - Duration: 1:29.

Cock a doodle do!

My dame has lost her shoe,

My master's lost his fiddlestick,

And knows not what to do.

Cock a doodle do!

What is my dame to do?

Till master's found his fiddlingstick,

She'll dance without her shoe.

Cock a doodle do!

My dame has lost her shoe,

And master's found his fiddlingstick,

And knows not what to do.

Cock a doodle do!

What is my dame to do?

Till master's found his fiddlingstick,

She'll dance without her shoe.

For more infomation >> Cock A Doodle Doo | Cartoon Nursery Rhymes for Babies | Kindergarten Kids Song by Little Treehouse - Duration: 1:29.

-------------------------------------------

Relaxing Harp Music Sleep Music, Meditation Music, Spa Music, Study Music, Instrumental Music - Duration: 2:00:01.

The Power of Music To Reduce Stress

The soothing power of music is well-established

It has a unique link to our emotions

so can be an extremely effective stress management tool.

Listening to music can have a tremendously relaxing effect

on our minds and bodies

especially slow, quiet classical music.

This type of music can have a beneficial effect on our physiological functions

slowing the pulse and heart rate

lowering blood pressure,

and decreasing the levels of stress hormones.

As music can absorb our attention

it acts as a distraction at the same time

it helps to explore emotions

This means it can be a great aid to meditation

helping to prevent the mind wandering.

Musical preference varies widely between individuals

so only you can decide what you like and what is suitable for each mood.

But even if you don't usually listen to classical music

it may be worth giving it a try

when selecting the most calming music.

When people are very stressed

there is a tendency to avoid actively listening to music

Perhaps it feels like a waste of time

not helping to achieve anything.

But as we know,

productivity increases when stress is reduced,

so this is another area where you can gain vast rewards

It just takes a small effort to begin with

To incorporate music into a busy life,

try playing CDs in the car,

or put the radio on when in the bath or shower.

Take portable music with you when walking the dog

or put the stereo on instead of the TV.

Singing (or shouting) along

can also be a great release of tension

and karaoke is very enjoyable

for some extroverts!

Calming music before bedtime

promotes peace and relaxation and helps to induce sleep.

Không có nhận xét nào:

Đăng nhận xét