- Installing Google Analytics onto your website
is a good idea.
So you can start answering questions like,
how many users came to my website?
What did they do?
And did they convert?
So how do you get started with Google Analytics?
Well, the first step would be installing it,
and that's what I'm gonna show you in this video,
but every website is different
and there are also many different ways
to install Google Analytics onto your website.
That's why I'm gonna show you four different ways
to connect your website today and you can choose
the best one for you.
Are you ready?
Let's dive in.
All right, to get started,
we head over to Google Analytics website
that can be under the Marketing Platform,
or you can go to analytics.google.com.
And here you need to, first of all,
sign up with your Google account.
Now this can be your email address that you use with
your Gmail, for example,
it could also be the email address that you use
to log into YouTube,
no matter what you need to have a Google account to sign up.
If you don't have one, you need to create an account.
And I have one here already,
so I'm just going to login,
and then we'll get to the interface of Google Analytics.
If you're completely new to it,
it will look a little bit different
and that's kind of like this.
So we'll create a new account here
and we need to give a new account, detail name.
This can be anything,
but usually if you're doing this for company,
I would put the company name in here.
You can choose to share some data with Google
and then you can create a new property.
So here I would enter the website.
So if you have multiple properties,
you would be able to distinguish
and then enter your reporting time zone and your currency,
this is particularly important
if you run an e-commerce website.
Now you might know that Google Analytics has been upgraded
to Google Analytics 4 lately.
There is still the possibility to create
a Universal Analytics property.
And this is what I would actually recommend you to create
because most of the information out there
is still about Universal Analytics.
It's also a little bit more reliable currently,
and has more features than Google Analytics 4,
and some platforms you can't actually
install Google Analytics 4 so easily,
but if you're adventurous and you want to go
right away with the new version,
you can choose to run with a Google Analytics 4 property.
We will go with a Universal Analytics property for now
and put in here, our website URL.
And we can choose to create both
the Google Analytics 4 property
and a Universal Analytics property,
which I will do right now.
So I will click here on next, you can answer some questions,
but you don't have to, and accept the TOS.
And now we have created our Google Analytics account.
Now this is actually a Universal 4 property,
here we see that
this is different from the Universal Analytics property,
because we have here a G parameter.
I will actually go over as there has promised.
They have also created for us here, a UA property,
a Universal Analytics property,
which we are going to install.
And then we can go under the property settings
and here we will get our tracking ID,
and this is the ID that we will need to
install Google Analytics on our platforms.
So how do we now integrate Google Analytics
onto our website?
Now there are four ways of doing so,
and the first way I would show you
is to use a Native Integration.
So if you have, for example, a website builder like Shopify,
where you have limited access to the website
and you haven't really built a website yourself,
but it's something that
has been created by a website builder,
then chances are that there's actually already
a good integration for Google Analytics.
So when you go to the backend of your website,
you, for Shopify at least can go here to online store.
And then we can go to our preferences.
And then we scroll down here
and we can see Google Analytics.
And this is the integration
that we can choose for Google Analytics.
Now, there is already a UA account in here,
now you just need to put in the UA code right here,
and we can save this.
You can choose to send also
enhanced e-commerce tracking data,
which I would recommend for our Shopify store.
And it should now be installed.
Now, how can we actually see if it's installed?
Well, let's head back to our store here
and I'm going to simply reload the page
that should send data to Google Analytics,
if everything went correctly.
So instead of Google Analytics,
you can go over to the real-time report
and look under the overview here
to see if there is a pageview coming in.
And right now we have zero active users.
Let's try this again.
Reload here and see if anything comes through.
Yes, here we go,
we have our pageview that came through
and I am currently on the homepage, which is just the slash.
But if I go to a product page here
that should again send a new pageview over,
and the active page actually changes.
So we now know that Google Analytics is connected
to our website and we are tracking data.
Now, this is the first way to integrate
Google Analytics onto your page
through a Native Integration.
This is built into the website builder in many cases,
to integrate Google Analytics.
It's the same way you can look up instructions
for other website builders like Wix or Squarespace,
because I know they also have Native Integrations
that you can utilize.
Now, the second way to install Google Analytics
is to use plugins.
So if your store system
actually allows you to install plugins,
then you can utilize this method pretty easily.
So I'm here on our demoshop.com,
which is a WordPress store.
And in order to install Google Analytics,
we can simply go ahead and look for a plugin.
So on the plugins, you can always add new plugins.
This will take you to the
repository of different plugins for WordPress.
And we can search here for Google Analytics.
And here we go,
there are many different plugins that we can use.
I usually like this one because it's quite lightweight,
GA Google Analytics, and we just click and activate it,
and that should be now installed on our websites.
So we need to configure it
and put in our code under settings,
you go to Google Analytics here,
and we have our plugin settings.
And here we put in our GA tracking ID.
Now there are many different other
things that you can customize your installation with,
but I will go ahead and just save this change.
And again, now it should be installed on our page.
We can reload our page and then see
if a new request comes in.
Yes, we have a new request right here.
Let's go ahead and go to another page.
And it also gives us a new page view here.
By the way, you can also utilize a extension
that is installed on a Chrome browser
called the Tag Assistant Legacy by Google,
just search for that in the Chrome extension store,
and with that Chrome extension,
you can check whether your Google Analytics
is installed correctly, which is the case right here.
So again, a another easy way to install Google Analytics
onto a website with the help of Plugins.
All right, so this feels like a good moment
to talk about the sponsors of today's video, Hotjar.
Hotjar is the industry leader
in the heatmaps and recording space.
While Google Analytics can show you
what users are doing on your website,
Hotjar helps you to understand why they are doing things.
With Hotjar your whole team gets an intuitive
visual way to discover, consolidate
and communicate your visitors needs.
Here's how it works.
First, you install Hotjar on your website
the same way you would do it with Google Analytics.
And then you are ready to dive in
to click and scroll heatmaps,
which allow you to see how far you scroll down your pages
and which elements they interact with.
Then you have user recordings
where you can follow user sessions
and identify sticking points
on your conversion path and surveys,
which allow you to collect user feedback that can lead you
to validate ideas, understand your customers,
and improve your copy.
And that's just the start of it,
there's so many more features of Hotjar
that will help you not to only understand
what users are doing on your website,
but also why they are doing things.
And that's why I think it's a great tool
to add to your analytics toolbelt.
Check out Hotjar by clicking the link
in the description down below
and sign up for a free trial today.
Now, the next way I want to show you
how to install Google Analytics is actually through
a tool called Google Tag Manager.
Now Google Tag Manager is a tag management tool
that lets you install
and manage your codes from an outside website
and install codes onto your page.
This is particularly useful if you work with multiple people
on a website and also have multiple codes
that you want to install
like the Facebook pixel, for example,
or Google Analytics.
And especially once you want to do
any kind of customization,
like tracking button clicks, scrolling,
or installing cross domain tracking, for example,
all of these features can be easily installed
via Google Tag Manager,
and that's actually my preferred way of installing
Google Analytics nowadays.
So how would you set this up?
Also inside of Google Tag Manager,
you will log in with your Google account.
You can create a new account here, put in your company
and then put in the container name,
and choose your target platform,
our case it would be web.
And we create this, adhere to the TOS
and we get to the page.
And we get two codes here,
that we need to install onto our website.
How do we do this?
Different ways of doing this like Google Analytics,
but we can also use a plugin,
for that, we just need to have this GTM ID up here.
So we'll go ahead and copy this GTM ID.
And then on our WordPress website,
we can utilize another plugin.
So I'm going install another plugin,
just search here for Google Tag Manager.
And here we go to Google Tag Manager
for WordPress plugin is usually what I choose.
We activate this.
Now it's installed.
I want to deactivate actually our Google Analytics plugin.
So we don't have it installed twice.
And now we configure our Google Tag Manager plugin
in the settings menu.
Here, we have Google Tag Manager
and we enter our container ID, right here GTM.
And then we'll go with the codeless injection,
save this change.
And it's now installed.
We can also check this inside of our page.
I'm gonna reload this.
And then with our tag assistant extension,
we have now Google Tag Manager installed.
So this should be working fine.
Now, instead of Google Tag Manager,
we can deploy Google Analytics
and Google Analytics is a marketing tag,
which we can create by going over here to tags,
click on new.
And then under the tag configuration,
this menu opens with a lot of different templates
that we can utilize.
In our case we want to utilize
Google Analytics, Universal Analytics,
and we are going to send over a pageview,
then we want to set our settings variable.
So I'm gonna go here with new variable
and our tracking ID put in here.
We also give this a name, save this.
So this now in this settings variable,
then we can choose triggers
and triggers are rules when we want to deploy our tag.
In our case, we want to deploy this on all pages
like it is normally,
and this is now the trigger.
We can give this all a name
and save this,
and then we can do something special here.
We can go into a preview mode.
This will deploy our tags,
but only on our browser and not for the whole
people who are on the website right now,
which is useful for testing things and seeing if they work.
So in our case, here
we are now connecting our tag assistant to our website.
We get this little pop up here,
and we can see inside of the tag assistant,
which tag's fired on my website.
So in our case, our tag has fired here
and is now deployed and should send data
over to Google Analytics.
Should also be seeing this right here
inside of Google Analytics is now deployed.
Don't worry about this,
two of the Google Tag Managers seem to be installed
through the tag assistant,
but this is actually an error here.
The ultimate test would obviously be
inside of Google Analytics.
We can go over to the real-time reporting
and see here if there was a pageview, which there was.
So let's go ahead and try to start again,
go over to the next page.
Yes, here we go.
We have a new pageview.
So this seems to be working fine as well.
Now, we are doing this all on preview mode.
So if you wanna take this live to our website,
we can actually submit a version,
which is another cool thing about Google Tag Manager,
because we have version control built in.
So I can give my version a name,
and if anything goes wrong later on,
we can revert back to an older version if you choose so.
With Google Tag Manager,
you can obviously do a lot more customizations,
a lot more triggering and fancy stuff
that we have also videos on this channel as well.
So this is the third method of deploying
Google Analytics on your website.
Now I know this might seem like a lot of steps,
but especially if you wanna go a little bit more advanced
customize your installation,
nowadays, I would say Google Tag Manager is the way to go.
Last but not least, I want to show you a viable method,
but probably not the most convenient one.
And especially if you are not a developer,
not something that I would recommend.
And this is installing our code manually on the website.
So if you have a website where you have access to the code
and can tweak the code, so in our case,
we are here on WordPress website
and we're just going to turn off
Google Tag Manager right here,
and you have access to changing around code.
In our case, we can go over to appearance
and then theme editor.
We have the ability to change the website code directly.
And if you are a developer
and you created a website from scratch,
then you can always go ahead
and also install Google Analytics
onto your website, but manually.
And for that, you just need to have the right tracking code,
go over to your tracking info right here,
in the property settings.
And he would get the tracking code
that would need to be installed onto our page.
So I'm gonna copy this and then go over to our theme here.
And we actually going to put this into the header PHP.
Now it's recommended to put this as high up as possible
in the head section of your page.
So we'll put this in right here and then update our file.
And the file has successfully been edited.
Let's go back to our page and we can see Google Analytics
is here installed through the gtag, the global site tag,
and data should be flowing into our account again
through this method.
So this is one of the methods
that you definitely can take advantage of
if you have access to the code.
I usually don't recommend this method of installing
Google Analytics onto your website,
because you need to know a little bit about code,
especially if you want to customize
and change something around
and you're tracking code later on.
And therefore it's definitely the most advanced
form of installing Google Analytics onto your website.
All right, so there you have it.
These are the four ways you can connect your website
to Google Analytics.
Just to recap, you can install your GA
through a Native Integration, through a Plugin,
through Google Tag Manager
and by placing it manually in the code onto your website.
It really depends on what platform you are working with
and what your plans are in terms of tracking.
But if I had to choose just one,
I probably go with the Google Tag Manager Integration
as it gives you more flexibility down the line,
and you can extend your implementation,
customize it later on.
But no matter what you have chosen as an integration.
Now you have Google Analytics installed, right?
Congratulations, what now?
Well, get started exploring Google Analytics,
check out this video right over here,
where we look at the first reports
and see what you can discover inside of Google Analytics.
Now, hope you found this video helpful,
and you check out our other Google Analytics videos
on this channel, and my name is Julian,
till next time.