Google Analytics event tracking using
analytics.js hello and welcome
in this video session I'm going to quickly show you how to set up
event tracking for external hyperlinks
let's say you have a website
let's say you have link that points to different URL
external for example right or whether
particular hyperlink points to a file download and
let's say you want to track you wanna know how many of your
visitors are clicking on certain links if that's the case
we simply use Google Analytics
tracking code which looks like this now this code
let me copy this it will be available on
description of this URL this video tutorial right
I've got Dreamweaver open here this is the RAW file
of the webpage that I've shown you before let me go to source code
and as we can see this is our hyperlink
here and within that you simply create an onClick Event
Press enter so that
we can see what's going on let's
click our onClick Event and let me paste that code that I've
just copied what we're doing
is put it on a new line so we can see
this stays
in itself right this is a required field this also is a required field
where as this this is an option field that means I can simply delete that but
let's leave it in place
so Event Category is whatever we want to
name it let's say it is
external link to PayPal
site for example
action is Event Action is whatever we want to name it
let's say click on the link for example and
event label is whatever name you want to name it
so that you remember what
the Event you're Tracking is external link for PayPal site
for example therefore it is as simple as that
you simply find the code in the description
change it to whatever you want to name it for your Event Category
for Event Action you simple name it to whatever you want to name it
an Event Label simply name it to whatever you want
to name it let's copy this particular code
let's track another hyperlink
we're using the onClick Event so let me simply paste that
code put on a new line
and as we can see now we have to then change it to something else cause it's
another link we want to track right so then we'll say this is a link to
SEO blog for example that's the category name and let's say
clicked on SEO link and label
went to SEO blog
for example right and that's it
then we simply upload this file
and once
we upload it what will happen is when
someone presses on the link that you've created the on click event for
in our example it was this link
and it was this link so when someone clicks on this
it'll send Tracking Code to Google it's store it so
when someone clicks on this it'll do the same thing
but in different categories and actions and so on right
Google Analytics interface on the left hand side you have
events under the behavior option if you were to press on overview
what will happen then someone clicks on your links your event category will be
whatever event category you named it
event action will be whatever
event action you named it
same is true for event label as well okay
so it is that simple to create
on click events using Google analytics
thank you very much for your visit if you found this video tutorial useful
please give me like and I also encouraged to subscribe to my YouTube channel
because I have many many useful video tutorials that I
keep updating often you will surely
enjoy it if you're operating a website thank you very much
happy rankings thank you bye bye