How to setup Google Analytics on website - BNA iTech

Breaking

Post Top Ad

Post Top Ad

Sunday, September 30, 2018

How to setup Google Analytics on website


tutorial Google Analytics



There are a few ways to add Google Analytics tracking code to your website

Adding Google Analytics to your website enables you to track the number of visitors to your site, the search keywords they use to find your site, the time spent on your site, goal conversion and much more.

A few housekeeping items before we move forward, this tutorial assumes that you already have a Standard Google Analytics account and not a Google Analytics 360 account. Second, that you have already set up a property in Google Analytics, which allows you to generate a tracking ID.

With that settled, we’ll explore two ways to add Google Analytics code to your website.

Google Analytics Tracking Code

The first step you’ll need to do is find your tracking ID, which is a unique ID created for your Google Analytics account.

To get your tracking ID, follow these steps:

Log in to your Google Analytics account
On the bottom left-hand side of the page, click Admin
From the left column titled Account, select an account from the dropdown menu
From the middle column titled Property, select a property from the dropdown menu
Under the Property column, click Tracking Info > Tracking Code
Your website’s unique tracking ID is shown at the top of the page under Tracking ID and starts with UA:XXXXXX

Once you’ve identified your tracking ID, you’ll need to get your tracking code snippet, which can be found on this page as the Global Site Tag (gtag.js). The gtag.js is the tracking code for this specific property and you’ll need to copy and paste this code to every webpage you want to track on your website.

To copy and paste your gtag.js, follow these steps:


Replace the GA_TRACKING_ID with your unique tracking ID provided by Google Analytics
Paste the code snippet right after the <head> tag on each page of your site that you’d like to track in Google Analytics.





Step 1
Go to https://www.google.com/analytics/ and click on Access Google Analytics at the top right.

Step 2

Once you are logged in, click on Admin at the top.

Step 3

Click on the Account dropdown and select the account under which you would like to add a new website.




Step 4

In the middle Property column, click on the dropdown and Create new property.







Step 5

Fill in your website details and click Get Tracking ID button.

You should now see the Tracking ID and tracking code.



Google Tag Manager


You can also use Google Tag Manager to add the Google Analytics code to your website. Google Tag Manager is a free tool and is useful for websites that use multiple analytics or advertising performance tools from multiple campaigns.

To install Google Analytics code via Google Tag Manager (GTM), follow these steps:
(Source: Google Analytics Documentation)

In GTM, select Create Tag and choose Google Analytics
Then select Universal Analytics.
Name your tag, preferably something related to Google Analytics (like GA). 

Add your Google 
Analytics property ID or gaProperty variable.

Choose the Track Type (i.e. Page View)

Choose your firing triggers such as All Pages, which the tag will fire the tracker on every page of your website.

Gtag.js or Google Tag Manager?


If your website is already using Google Tag Manager, then gtag.js is not necessary and continue to use GTM. Since GTM inherently combines event data from Google Analytics and Google Adwords, it’s best to keep it running if it’s already in place.


Streamlining the installation process to get Google Analytics code on your site faster.

Allowing you to send event data to multiple tools as once.
Keeping all tracking tags in once place in your website code.
Either way, we recommend that you add Google Analytics to your website, so you can keep track of all your event data.

Post Top Ad