Home/Blog/Contextual advertising/How to add a website to Google Analytics

How to add a website to Google Analytics

To find out more data about your site — to see the target audience, analyze content, see how changing the structure and design of the site affects its traffic — you need a special tool. Google Analytics is one of these tools.

What is Google Analytics

Google Analytics (GA) is a free Google service that creates detailed statistics about website visitors. The site’s web analytics is generated on the Google service thanks to the Javascript tracking code (JS code) installed on the pages.After you add Google Analytics to your site, about three hundred new possibilities will open up to you. Let’s analyze the most important ones.

Traffic sources

This tool identifies the internet traffic of a website from various channels.


Data shows a website’s effectiveness in persuading a visitor to take a certain targeted action.

Behavioral factors

Statistics show visitor engagement. It helps to determine the success of your web resource partially.In addition, Google Analytics is integrated with Google Ads. Analysis of the data obtained by Google Analytics allows you to optimize advertising and marketing campaigns in Google Ads. In particular, your contextual advertising can become better. All this gives you reasons to make the formation of leads more successful (lead generation) and increase your site’s position in search results (SEO). 

Instruction: how to add a website to Google Analytics

To add a site to Google Analytics, follow these instructions.

Create an account

First, you need to go to the service’s website and register. If you have a Google account, enter your data and click Next. Then, to add the site to Google Analytics, create an account:


  • Decide what you are going to track: a web resource or a smartphone application.
  • Add an account name.
  • Enter your site’s name.
  • Enter its URL.
  • Click on the desired industry (for example, shopping).
  • Specify the country and time zone of your website audience.


When setting up data sharing after you have added Google Analytics to your site, it is advisable not to remove the automatically checked checkboxes — this will allow Google to improve the service. 

Setting a tracking code

Click on the Get Tracking ID button and confirm the user agreement — a window with the tracking code will immediately open. Then you should send the data to Google Analytics. There are two ways to do this:


  1. Add the Google Analytics code to the site on all pages you want to track using the tag </head>.
  2. Add code to pages from the Google Tag Manager service.

Basic setting

To add a site to Google Analytics and then access the reports, you need to set up a data view. When you add a new site to Google Analytics, the first view with all available data is automatically created in the account. To view more relevant and important data, you need to create additional views and set filters.You can configure the view in the admin panel in the View Settings section. For this, you need to:


  • specify the currency that will be displayed in the reports;
  • turn on the bot filter so that they do not worsen network traffic statistics;
  • turn on search engine queries tracking your site to know what users are searching for the most.


To properly connect Google Analytics to the site, you need to add goals. They allow you to evaluate the actions of visitors on the website that are optimal for you, that is, conversions. It will help you better understand the user’s actions before the purchase. In addition, you will know what (key, channel, or ad) brought the sale. To set up goals, go to the View column and click on Goals. Then click on +New Goal and select the Custom template. Then choose one of the goal types (landing page, duration, pages/screens per session, event). Next, you need to set the goal conditions. Important parameters are Category and Action.

Resource settings

Setting up a resource includes, in particular, the exclusion of unwanted sources of Internet traffic. It is necessary if you do not have built-in payment on your site. Because when a user goes to the site of the payment system and then returns to your web resource, Google Analytics considers transitions from payment systems to be a new session. You can turn off unwanted sources in this way: in the Resource menu, click Tracking Code, then select Referral Exclusions List.

Google Tag Manager (GTM)">Installing analytics with Google Tag Manager (GTM)

We have already figured out how to add a site to Google Analytics by creating an account and setting up resources. You can also add Google Analytics to the site using the Tag Manager. It is intuitive, helps to speed up the website, and saves time for specialists to edit the website code. To add Google Analytics to a site with GTM, perform the following steps:


  1. Go to the GTM site and sign in to the Google account you want. Name the container (you can enter your URL) and agree to the user terms. Next, a window with your GTM code will appear. The window also indicates where to insert code fragments. 
  2. Then go to the Variables tab and click Create. In the utilities section, select the Google Analytics settings, specify the GA tracking ID, and go to the Advanced settings section. Then you need to click on Advertising and enable the features for the contextual media network. These actions activate remarketing in Google Analytics and statistics based on interests and demographics.

Access control and linking to Search Console (GSC)

The Google Analytics tracking code will allow you to add your site to Google Search Console. For this, you need to log in to GSC, click on Add a resource in the list, and choose the Google Analytics code from the proposed methods of proving ownership.

Worth a read

Among the best in the SMM category: Lanet CLICK in the IAB Ukraine ranking

Among the best in the SMM category: Lanet CLICK in the IAB Ukraine ranking

The non-profit organization IAB Ukraine, which is a member of the international association Interactive Advertising Bureau, summed up the results […]

How to promote a medical site in 2024

How to promote a medical site in 2024

Promotion for the site of medical services is associated with additional difficulties due to the nuances inherent in this niche. […]

10 Steps to Optimizing Your Local Business (GMB)

10 Steps to Optimizing Your Local Business (GMB)

Google My Business is an essential tool for businesses with a physical location. This service is especially important for companies […]