Interview Prep
Interview questions, roadmaps and practice sets
Tutorials
Free tutorials on 30+ topics
Blog
Career guides, skills and interview tips
Free PDFs
Notes, cheat sheets and question banks
Certificates
Free skill tests and course certificates
Tools & Whiteboard
Free tools you can use right in the browser
Practice Tests
Mock tests, MCQs and quick Q&A
Free LMS
Learn on the Uncodemy LMS
Choose the best training program according to your career.
Improve the performance of your business with our innovative Industrial Training Program.
Read More →
Our instructor-led training classes are designed to make you an expert.
Read More →
Real-life case studies are a great way to demonstrate your practical knowledge.
Read More →
Explore blogs, latest technologies and industry updates with practical examples.
Read More →Browse all available training programs and choose the right one for your career.
Read More →Know more about who we are and what we stand for.
Discover our mission to equip individuals with essential IT skills and industry expertise.
Read More →
Free tutorials, interview questions, tools and calculators to help you learn.
Explore →Learn, practice and plan your career — bilkul free.
Book a free video counselling session and pick the right course for you.
Read More →Google Analytics 4 (GA4) tells you how many people visit your blog or portfolio, where they come from, which pages they read and what they click. Setup takes about 20 minutes: create a property, add one tag, confirm data arrives, then mark the actions you care about as key events.

Google Analytics 4 is the current version of Google Analytics. The older Universal Analytics stopped processing data on 1 July 2023, so any guide that mentions "UA-" tracking IDs or "bounce rate views" is out of date. GA4 records everything as events (a page view, a scroll, a click), and its reports are built from those events.
https://yourname.github.io) and a stream name.G-XXXXXXXXXX.How you add the tag depends on how your site is built.
Paste Google's tag into the <head> of every page, replacing the ID with yours:
<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>
On a static generator (Hugo, Jekyll, Astro, Next.js) or a React portfolio site, put it in the shared layout or head template so it appears on every page once.
Use Google's official Site Kit plugin, or a header-scripts plugin to paste the tag. Do not add it twice (plugin and theme), or every page view will be counted twice.
Wix, Squarespace, Blogger and similar builders have a field for a Google Analytics Measurement ID in their settings. Paste the G- ID there instead of the full script.
If you already use Tag Manager, create a Google tag with your Measurement ID, trigger it on all pages, and publish the container.
Standard reports can take up to a day or two to fill in; Realtime is the quick check.
For a portfolio, the important actions might be "clicked my email", "downloaded my CV" or "opened my GitHub". For a blog, it might be newsletter sign-ups. In GA4 these are called key events (Google renamed "conversions" to key events in 2024).
File downloads and outbound clicks are already tracked by enhanced measurement. For a specific button, send your own event:
<a href="mailto:you@example.com"
onclick="gtag('event', 'contact_click', { method: 'email' });">
Email me
</a>
After the event has been received at least once, go to Admin > Events and mark contact_click as a key event. You can also create key events from existing ones, for example a page_view of your thank-you page.
| Question | Where to look in GA4 |
|---|---|
| How many people visit? | Reports > Home, or Reports > Engagement > Overview |
| Where do visitors come from? | Reports > Acquisition > Traffic acquisition (by session default channel group) |
| Which posts are read most? | Reports > Engagement > Pages and screens |
| Do people actually read? | Average engagement time and engagement rate in the same report |
| Which pages bring visitors in first? | Reports > Engagement > Landing page |
| Which searches bring people? | Search Console reports after linking |
| Who contacts me or downloads my CV? | Reports > Engagement > Events, filtered to your key events |
GA4 counts a session as engaged if it lasts longer than 10 seconds, has a key event, or has two or more page views. Engagement rate is the share of engaged sessions, and bounce rate in GA4 is simply its opposite.
If your visitors include people in the EU or UK, you need a consent banner before setting analytics cookies, and Google's Consent Mode lets the tag respect that choice. India's Digital Personal Data Protection Act, 2023 also requires a clear notice for personal data. Add a short privacy page saying you use Google Analytics and what it collects. If you would rather avoid cookies entirely, see these Google Analytics alternatives.
Yes, the standard version is free. Google Analytics 360 is the paid enterprise version with higher limits.
GA4 only counts visitors whose browsers run the tag. Ad blockers, declined consent and bots filtered out by GA4 all reduce the count, while server logs count every request.
Yes. Add the tag to the head of your HTML or to your site generator's layout template, then publish.
Analytics is one module in Uncodemy's digital marketing course, alongside SEO and paid ads, with Dedicated Placement Support.