To connect your new Webflow site with Google Analytics 4 (GA4) for tracking page hits, you'll need to follow a few steps:
Step 1: Set up a GA4 Property
1. Sign in to your Google Analytics account or create a new one.
2. Click on the "Admin" tab in the bottom left corner.
3. In the "Account" column, select the account where you want to create the property.
4. Click on the "Create Property" button.
5. Fill in the required information like property name, time zone, currency, etc.
6. Click on the "Show Advanced Options" link and enable the "Create a Universal Analytics property" option.
7. Click on the "Next" button.
8. Review the terms of service and click on the "I Accept" button.
9. Click on the "Create" button to finalize the creation of the property.
Step 2: Get the Measurement ID
1. After creating the GA4 property, you'll be redirected to a page with tracking code options.
2. Find the "Measurement ID" which should have the format "G-XXXXXXXXXX" (where "X" represents alphanumeric characters).
3. Copy the Measurement ID as you'll need it in the next step.
Step 3: Add GA4 Tracking Code to Webflow
1. Go to your Webflow project and open the Project Settings.
2. From the left-hand menu, click on the "Custom Code" tab.
3. In the "Head Code" section, paste the following code snippet:
```html
```
4. Replace "G-XXXXXXXXXX" with the Measurement ID you copied earlier.
5. Save and publish your changes.
Step 4: Verify Setup and Track Page Hits
1. Return to the Google Analytics interface.
2. Click on the "Home" tab in the left-hand menu.
3. You should start seeing real-time data in the GA4 dashboard.
4. To verify if tracking is set up correctly, visit your Webflow site and navigate through a few pages.
5. Back in the GA4 interface, click on the "Realtime" tab and check if you see active users or incoming events.
6. If everything is working properly, you have successfully connected your Webflow site with GA4 for tracking page hits.
It's important to note that GA4 uses a different tracking model compared to Universal Analytics, so you might need to explore and configure your GA4 property according to your specific tracking requirements.