Lately, Google has launched new Google Analytics 4, however, the new version doesn’t support goals with conversion tracking from form submission yet. If you use GA4, you can create a Universal Analytics property (steps below) or track conversion with Google Tag Manager.
If you use Universal Google Analytics, you can skip the first section and head to Install your tracking code.
(GA4 only) Create a universal property
- Log in to your Google Analytics account, go to Settings > Admin, and select Create Property.
- Name the property and select Show advanced options at the bottom.
- Use the toggle to create a universal property. Paste the URL of your landing page. You can create two properties at the same time – Universal and GA4, or only the Universal one.
- If you select Create both, you can create a goal to track form submission only for the Universal property (1). The GA4 property is marked with GA4 at the end (2).
You can install more than one global tracking code for one landing page/URL. For example, you can track conversion from form submission using the Universal property, and track other events using the GA4 property. You just need to switch between properties in Analytics to see the metrics.
Install your tracking code
- Log in to your Google Analytics account, go to Settings and Admin.
- You need to create a property for your subdomain. Click on Create Property and paste the URL of your landing page. Now, you can navigate to Tracking Info and select Tracking Code.
- Copy your Global Site Tag (gtag.js).
- Type a name and paste the snippet in the Content field. Select Head for both pages and click Add.
GA will be tracking data on your landing page immediately after adding the tag. You’ll see complete data in GA reports after about 24 hours, but active users on the landing page are visible in the Real-time tab. You can verify the code on your landing page using Google Tag Assistant.
Adding the gtag.js is just the first step to fully take advantage of Google Analytics. You can track conversion (see below), track button events, or track other events.
Read our blog post on How to use GA with landing pages.
Track conversion (form submission)
To track the conversion rate on your landing page in GA, you need to add and configure a goal in GA. It’s best to track conversions on the thank you page.
- Log in to your Google Analytics account and go to Admin tab > Goals. Click + NEW GOAL to create a new goal.
- In the Goal description, name your goal and select Destination. Click on Continue.
- In Goal details, select Begins with from the drop-down menu. If you use the default thank you page with the dynamic URL (changing hash), enter the empty field as example.example.com/send?hash=. Replace our example with your URL. Finally, click Save.
NOTE: If you have your own custom thank you page, select Equal to from the drop-down menu and paste the URL.
Go ahead and submit a form to verify whether the tracking tag and goal work as it supposed to.
You can access the data in Conversions > Goals.
You can switch between your properties anytime.