Back to all lessons
Lesson library

Set up Google Analytics

Add Google Analytics to your Webflow project.


This video was created prior to the launch of the features: gtag.js and IP anonymization.

This video features an old UI. Updated version coming soon!
Clone this project

Google Analytics includes powerful metrics like how many users and pageviews a site is getting, how long people are spending on the site, and how many of them are leaving the page without clicking other links (bounce rate). Google Analytics also allows you to see where the traffic to your site is coming from. You can even narrow these parameters down to the city.

The audience overview page is displayed. The GEO data is highlighted for the Users, pageviews, Avg. Session duration and bounce rate.
The location tab is active and highlighted are the first 4 cities.

For a lot of businesses, this helps to figure out where to invest the marketing dollars and it can even help measure the effectiveness of a particular marketing campaign.

In this lesson:
  1. Adding Google Analytics to a project
  2. Tracking Google Analytics events for Ecommerce
  3. Enabling IP address Anonymization

Adding Google Analytics to a project

You can directly integrate Google Analytics into your Webflow project. Google Analytics settings are located on the Project settings → Integrations page.

Google Analytics settings are filled out to a tracking ID. Googles gtag.js and ip address anonymyzation are both on the Yes radio button status.
Project settings → IntegrationsGoogle Analytics
Note: You do not need a paid plan to integrate Google Analytics into your site. However, you will need a paid plan to add any additional custom code.

Getting Google Analytics tracking ID

  1. Visit the Google Analytics admin page [↗]
  2. Login to your Google Account (create an account if you don’t have one)
  3. Fill out the relevant information for your project (e.g. site name, site address, etc)
  4. Press Get Tracking ID and Accept the Terms of Service
  5. Copy the Tracking (Measurement) ID to your clipboard
The Tracking (measurement) ID is highlighted on the Web stream details page.

Pasting the tracking ID in your project settings

  1. Go to your Webflow dashboard and access the Google Analytics settings of your project
  2. Paste the ID into the Google Analytics Tracking ID field
  3. Save changes and publish
A tracking ID is pasted in the Google universal analytics tracking ID text input field. This section is highlighted.
Choose publish destination is highlighted on the Project page in the dashboard. A blue publish to selected domains button is highlighted.

Testing the connection between your project and Google Analytics

To see if the integration is successful, go to the Real-Time tab and then Overview in Google Analytics. You should see yourself if you have your site open in a separate tab.

Need to know
Analytics data takes some time to gather. Insights might not be available until a day or so after they're collected.

Resource: To track outbound links, check the Google Analytics documentation

Tracking Google Analytics events for Ecommerce

If you've enabled Ecommerce for your project, you can track ecommerce-specific events like viewed product, added product to cart, and purchased product. Take the steps below, and Webflow will automatically pass those events over to Google Analytics.

  1. Enable using Google’s global site tag in your Google Analytics settings
A white radio button with blue background is turned on to YES. The gtag.js section is highlighted on the page.
Choose to use global site tag for Ecommerce event tracking.
  1. Enable ecommerce in your Google Analytics settings [↗]

Enabling IP address Anonymization

Enabling IP address anonymization masks addresses of your site visitors in Google Analytics. This allows you to meet requirements by data protection authorities in some countries. It also helps you respect your own privacy policies. You can enable IP anonymization in your Google Analytics settings section on the Project settings → Integrations page by toggling the IP address anonymization switch to "YES".

A white radio button with blue background is turned on to YES. The IP address anonymization section is highlighted.
Enable IP anonymization in Google Analytics to meet requirements by data protection authorities.
Learn more
Try Webflow — it's free