Setting Up Google Analytics 4 Step by Step
We show you how to create a GA4 property, add the measurement ID to your site, define key events (conversions) and test that data arrives correctly.

For Google Analytics 4 setup, you create an account and property at analytics.google.com, add a web data stream and get the measurement ID that starts with G-. You then add this ID to your site through the gtag.js code, Google Tag Manager or a field in your platform's admin panel. The last step is to mark events such as purchases and forms as key events and test them with DebugView.
What Is GA4 and Why Should You Set It Up?
Google Analytics 4 (GA4) is a free analytics tool that measures what visitors to your website and app do with an event-based model. Every interaction, such as a page view, scroll, click or purchase, is recorded as an event.
A properly set up GA4 lets you see which channel brings sales, which page loses visitors and what your ad budget returns. Marketing without measurement relies on guessing the results. To complete the search-side data, we recommend doing the Search Console setup steps on the same day.
An important rule: the Analytics account and property should be created under the business's own Google account, and an agency or developer should only be given user access. That way, even if the people you work with change, your data stays with you.
Preparation Before Setup
Writing the goal list in advance is the most skipped but most valuable step of the setup. A GA4 set up without deciding what to measure only shows the number of visitors; the information that actually helps your business is what share of visitors turn into customers.
For a corporate website, goals are usually forms, phone calls and quote requests; for stores, add-to-cart, checkout start and purchase steps stand out. When you write goals according to your business units, the reports speak the same language.
- An administrator with access to the site and to the code or panel
- A business-owned Google account with two-step verification turned on
- A list of the goals you want to measure: purchases, form submissions, phone clicks, WhatsApp clicks and so on
- Information about the site's cookie consent setup (KVKK, the Turkish data-protection law, and cookie policy)
- A decision on whether you will use Google Tag Manager
Creating a GA4 Property and Data Stream
Go to analytics.google.com with your business account. If you have never created an account, the start measuring button on the welcome screen takes you straight to the wizard; if you already have an account, you can create a new property from the Admin menu at the bottom left.
- Create an account: enter your business name as the account name and review the data sharing settings.
- Create a property: choose the property name, the reporting time zone (Türkiye) and the currency (Turkish lira). The currency matters for revenue reports to display correctly.
- In the business details and goals step, mark your industry, size and main objectives; this choice determines the default report set.
- Add a web data stream: enter your site's address (with https) and a stream name. Leave enhanced measurement turned on.
- Copy the measurement ID that starts with G- from the stream details; you will add it to the site in the next step.
Ways to Add the Tag to Your Site
There are three common ways to add the measurement ID to a site. Whichever you choose, use only one: adding the same ID both directly in code and through Tag Manager makes every page view count twice.
With the gtag.js code
On static or custom-coded sites, add the code Google gives you to the head section of every page, as high up as possible. If you use a shared template, adding it once covers all pages.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>With Google Tag Manager
If you will use multiple advertising and analytics tools, Tag Manager is the most flexible way. You add the container to the site once and manage all tags, including GA4, from the panel; the steps are in our Google Tag Manager setup guide.
From the platform admin panel
Ready-made e-commerce and site management systems usually offer a separate field for the measurement ID. In Aurora's e-commerce infrastructure, Google Tag Manager, GA4, Google Ads and Meta codes are added from the panel, and a live check screen shows which code is actually running.
Setting Up Conversions (Key Events)
Events you want to count as conversions in GA4 are marked as key events. The event must reach GA4 first; then, in Admin > Data display > Events, you turn it into a key event with the marker next to it.
Using the event names Google recommends lets reports and ad integrations work automatically. For example, generate_lead is recommended for form submissions and purchase for purchases. In e-commerce, always add a unique order ID, the amount and the currency to the purchase event; the order ID prevents the same order from being counted twice.
- To measure arrivals on the thank-you page without writing code, you can define a new event based on a page_view condition via Admin > Events > Create event.
- You can capture phone and WhatsApp clicks from enhanced measurement's outbound link data or with a Tag Manager trigger.
gtag('event', 'generate_lead', {
form_adi: 'iletisim_formu'
});gtag('event', 'purchase', {
transaction_id: 'SIP-10045',
value: 1499.90,
currency: 'TRY',
items: [{
item_id: 'URN-12',
item_name: 'Leather Wallet',
price: 1499.90,
quantity: 1
}]
});How Do I Verify the Setup?
After adding the tag, do not wait hours to see data. GA4's Realtime report shows visitors from the last few minutes; open the site from another device and check that you appear here.
To see events one by one, use the DebugView screen. When you turn on debug mode with Tag Assistant, every event from your browser is listed on the timeline with its parameters. Standard reports usually take 24 to 48 hours to fill.
- In the Network tab of the browser developer tools, look for collect requests; if the request goes out, the tag is working.
- Ad blocker extensions can block the request during testing; run the test in a window without extensions.
- After a purchase test, check that the amount and currency appear correctly in the reports.
Settings to Configure on Day One
When setup is finished, making a few admin settings right away prevents data loss you cannot undo later. Most of these settings do not work retroactively; the earlier you do them, the better.
- Raise the data retention period from the default two months to fourteen months; this lets you look at a longer history in exploration reports.
- Exclude office and team traffic with an internal traffic filter.
- Add payment provider domains to the unwanted referrals list; otherwise sales appear to come from the payment page.
- Set up the Search Console and Google Ads links.
- Along with cookie consent, check your Consent Mode configuration.
Common Mistakes
Wrong data is more dangerous than no data at all; double-counted sales or orders that lose their source lead to bad decisions. A week after setup, run a small consistency check by comparing the numbers with your order panel or form records.
| Symptom | Likely cause and fix |
|---|---|
| No data in Realtime | The ID is wrong or the code is not published; search the page source for the G- ID. |
| Page views doubled | The tag was added both in code and through Tag Manager; remove one. |
| Sales come from the payment site | The payment domain is not on the unwanted referrals list. |
| Key event does not appear | The event has not arrived yet or its name is misspelled; check the name with DebugView. |
| Revenue in the wrong currency | The currency parameter is missing or the property currency is different. |
Frequently Asked Questions
01Is GA4 free?
Standard GA4 is free and comfortably meets the needs of small and medium-sized businesses. For organizations that need very high data volumes and an advanced service level, there is the paid Analytics 360 edition.
02Will my Universal Analytics data be transferred to GA4?
No. Universal Analytics stopped processing data, and because the two systems have different data models, historical data is not carried over to GA4. GA4 data accumulates from the day the tag is installed.
03Can I measure Instagram and Facebook ad conversions with GA4?
GA4 sees the source of traffic from the UTM parameters in ad links. For the ad platform to optimize, though, you also need the Meta Pixel; we explain the setup in our Meta Pixel setup guide.
04Can more than one site be connected to the same GA4 property?
Technically yes, but putting sites belonging to different businesses in the same property muddles the reports. It is usually more correct to use a single property for subdomains of the same brand and separate properties for independent sites.
When you set up GA4 correctly and define your goals as key events, you base marketing decisions on data rather than guesswork. To build your measurement infrastructure, interpret reports and find growth opportunities, explore our SEO and analytics service, and for measurable ad campaigns our digital marketing solutions. You can also contact us for a conversion-focused landing page design with tracking codes ready.

