⚠
Affiliate Disclosure: LaunchMyHost earns commission if you buy through our links, at no extra cost to you. We test every host independently.
Full disclosure.
How to Set Up Google Analytics on Hostinger 2026 – Step by Step Guide
Google Analytics is the most powerful free tool for understanding your website audience — where visitors come from, which pages they read, how long they stay, and where they leave. If you run a website on Hostinger and haven't set up Google Analytics yet, you're missing data that could transform your content strategy.
This step-by-step guide covers how to install Google Analytics 4 (GA4) on your Hostinger WordPress site in 2026. No coding needed — takes under 10 minutes.
Important: Google Analytics 4 (GA4) replaced Universal Analytics (UA) in July 2023. This guide covers GA4 setup only. If you're still on UA, your data may already be lost — set up GA4 now.
Don't Have Hostinger Yet?
Get started with a fast, reliable host before setting up Analytics
Get Hostinger – 80% Off
Why Set Up Google Analytics on Your Hostinger Site?
🔄 Editor's Update — April 2026: We re-tested all hosting plans this month. Hostinger continues to lead on value, with speeds averaging under 200ms and uptime holding steady at 99.95%. Prices and features in this article have been verified as of April 10, 2026.
Hostinger's hPanel shows basic visitor statistics, but Google Analytics gives you much deeper insights:
- Traffic sources – See exactly how visitors find you (Google search, social media, direct, referrals)
- User behaviour – Which pages are most popular, average session duration, bounce rate
- Audience demographics – Age, gender, location, device type
- Conversion tracking – Track form submissions, affiliate link clicks, purchases
- Real-time data – See who's on your site right now
- SEO insights – Combined with Google Search Console, understand which keywords drive traffic
For affiliate marketers and bloggers, this data is essential for growing income. It connects with our Google AdSense guide — AdSense approval needs demonstrated traffic, which GA4 helps you grow.
What You'll Need
- A Google account (Gmail or Google Workspace)
- A WordPress website on Hostinger
- Admin access to your WordPress dashboard
- 10 minutes
Step 1: Create a Google Analytics Account
- Go to analytics.google.com
- Click "Start measuring"
- Enter your Account name (e.g., "My Website Analytics" or your site name)
- Under "Account Data Sharing Settings", choose your preferences and click Next
Step 2: Create a Property (GA4)
- Enter your Property name (your website name)
- Select your Reporting time zone (choose your country)
- Select your Currency
- Click Next
- Fill in "About your business" — select Industry category and business size
- Click Create and accept Google's terms of service
Step 3: Set Up Your Data Stream
- After creating the property, you'll see "Choose a platform"
- Select Web (for Hostinger WordPress sites)
- Enter your website URL (e.g., yourdomain.com)
- Enter a Stream name (e.g., "Main Website")
- Leave "Enhanced measurement" turned on — this automatically tracks page views, scrolls, clicks, and file downloads
- Click Create stream
You'll now see your Measurement ID — it looks like G-XXXXXXXXXX. Copy this — you'll need it in the next step.
Step 4: Install GA4 on Your Hostinger WordPress Site
There are three methods. Method A is recommended for beginners.
Method A: Using a WordPress Plugin (Recommended)
The easiest way — no code needed.
- Log in to your WordPress dashboard (yourdomain.com/wp-admin)
- Go to Plugins → Add New
- Search for "Site Kit by Google"
- Click Install Now then Activate
- Follow the Site Kit setup wizard — sign in with your Google account
- Connect your Google Analytics account and select the property you created
- Click Finish
Site Kit also connects Google Search Console and PageSpeed Insights — showing all your Google data in one WordPress dashboard. This is the method we recommend on our Hostinger WordPress tutorial.
Method B: Manual Code Installation via hPanel
Use this if you want to add GA4 without a plugin (slightly faster page loads).
- Log in to Hostinger hPanel
- Go to Websites → your site → File Manager
- Navigate to public_html → wp-content → themes → your-active-theme
- Open header.php
- Find the closing
</head> tag
- Paste your GA4 tracking code just before
</head>:
<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>
Replace G-XXXXXXXXXX with your actual Measurement ID.
Method C: Using Google Tag Manager
Google Tag Manager (GTM) is the professional approach — it lets you manage all tracking codes from one place without editing WordPress files. Recommended for users who plan to add multiple tracking codes (Facebook Pixel, conversion tracking, etc.).
- Create a Google Tag Manager account at tagmanager.google.com
- Create a new container for your website
- Install the GTM WordPress plugin ("GTM4WP" or "Site Kit")
- Enter your GTM container ID
- Add GA4 as a tag inside GTM
This method is covered in our SEO tips for beginners guide along with other essential tracking setups.
Step 5: Verify Google Analytics Is Working
- Go back to Google Analytics (analytics.google.com)
- Click on your property
- Go to Reports → Real-time
- Open your website in a new browser tab
- Within 30 seconds, you should see "1 user in last 30 minutes" in the Real-time report
If no data appears after 2 minutes, check that your Measurement ID is correct and the tracking code is installed on every page (not just the homepage).
Step 6: Connect Google Search Console
Connecting Google Search Console to GA4 unlocks keyword data — you'll see exactly which Google search queries bring visitors to your site.
- In Google Analytics, go to Admin → Property Settings → Product Links → Search Console Links
- Click Link and select your Search Console property
- Click Next then Submit
This is an essential step for any SEO work. Combined with our keyword research guide, you'll have everything you need to grow organic traffic.
Key GA4 Reports for Hostinger Website Owners
1. Acquisition Overview
Shows where your traffic comes from: Organic Search (Google), Direct (typed URL), Social (Facebook, Twitter), Referral (other websites), Email. This report tells you which marketing channels are working. For most content sites, Organic Search should be your biggest source.
2. Engagement Overview
Shows pages per session, session duration, and engaged sessions. Low engagement time (under 30 seconds) on most pages means your content isn't holding attention. Use this to identify weak content that needs improvement.
3. Pages and Screens
Your most-visited pages ranked by views. Use this to identify your "money pages" — content that already gets traffic and can be optimised for affiliate conversions or AdSense earnings. Related: our guide to making money blogging.
4. Audience Demographics
Age, gender, and country of your visitors. Useful for targeting content and ensuring you write for your actual audience. Location data is especially useful for AdSense RPM — US and UK traffic earns a lot more per click.
5. Real-Time Report
See who's on your site right now, which pages they're reading, and where they're from. Use this after publishing new content or running a promotion to see immediate traffic response.
Setting Up Conversion Tracking in GA4
For affiliate marketers, tracking link clicks is crucial. Here's how to set up basic conversion tracking:
Track Affiliate Link Clicks
- In GA4, go to Admin → Events
- Click Create Event
- Name your event (e.g., "affiliate_click")
- Set conditions: event_name equals "click" AND link_domain contains "hostinger.com"
- Save and mark it as a conversion
Now every time a visitor clicks your Hostinger affiliate link, GA4 records it as a conversion. This helps you identify which articles drive the most affiliate clicks and optimise accordingly. For more on building affiliate income, read our Affiliate Marketing Guide.
Common Issues and Fixes
GA4 showing no data / tracking not working
- Check the Measurement ID is correct (G-XXXXXXXXXX format)
- Confirm the tracking code appears in your page source (Ctrl+U in browser)
- Disable ad blockers — they can block GA4
- Check Real-Time report, not the main reports (there's a 24-48h delay)
Double tracking / inflated numbers
If you installed GA4 via both a plugin AND manually in header.php, you'll get double counts. Use only one method. Check your page source for two GA4 script tags.
Site Kit not connecting to GA4
- Make sure you're logged into the correct Google account
- Verify you have Admin access to the GA4 property
- Try clearing browser cache and reconnecting
Frequently Asked Questions
Is Google Analytics free?
Yes — Google Analytics is completely free for most websites. Google Analytics 360 (paid enterprise version) exists but the free version has more than enough features for bloggers, affiliate sites, and small businesses.
How long does GA4 take to show data?
Real-time data appears within seconds. Standard reports have a 24-48 hour delay before data is processed and visible. Don't panic if your reports look empty on day one.
Does GA4 track visitors without cookies?
GA4 is designed to work with or without cookies using Google's machine learning to fill in data gaps. However, you still need a cookie consent banner in the EU (GDPR) and some other regions.
Should I use Google Analytics or Hostinger's built-in stats?
Both. Hostinger's hPanel stats are good for a quick overview. Google Analytics is far more detailed and should be your primary analytics tool for making decisions about content and marketing.
Can I use GA4 with Hostinger's website builder?
Yes — Hostinger's AI Website Builder has a built-in Google Analytics integration. Go to the website builder settings, find the Analytics section, and paste your GA4 Measurement ID.
Summary – GA4 Setup on Hostinger
Setting up Google Analytics 4 on your Hostinger website is one of the highest-ROI tasks you can do in 2026. It takes under 10 minutes and gives you data that drives every content and marketing decision. Use Site Kit by Google for the easiest installation, connect Search Console for keyword data, and check your reports weekly to understand what's working.
Advanced GA4 Configuration for WordPress Sites
Once basic tracking is working, these advanced configurations help you get much more value from Google Analytics 4.
Setting Up Custom Events for Affiliate Tracking
For affiliate websites hosted on Hostinger, tracking which content drives affiliate clicks is the difference between guessing and knowing. Here's a complete setup:
- In GA4, go to Admin → Events
- Click "Create event"
- Name: "affiliate_link_click"
- Matching conditions:
- Event_name equals "click"
- link_url contains "hostinger.com"
- Click Save and mark this event as a conversion
Now in GA4, go to Reports → Conversions to see which pages drive the most affiliate link clicks. This data directly informs your content strategy — double down on topics that convert, improve or redirect effort from topics that don't. More on affiliate strategy in our affiliate marketing guide.
Setting Up Scroll Depth Tracking
GA4's Enhanced Measurement includes scroll tracking by default (tracks 90% scroll depth). To track more granular scroll depths (25%, 50%, 75%):
- In Google Tag Manager (if using), create a new tag
- Choose "Scroll Depth" trigger
- Set percentages: 25, 50, 75, 90
- Send as a GA4 event with parameter "scroll_depth"
Scroll depth tells you how much of your articles readers actually consume. If most readers stop at 25% on a 3,000-word article, your intro needs work. If 75% reach the end, your content is engaging.
Setting Up Click Tracking for Internal Links
Understanding which internal links get clicked most helps you improve your site architecture for SEO and conversions:
- In GTM, create a new "All Elements" trigger for click events
- Filter by Click URL contains your domain
- Create a GA4 event tag: "internal_link_click" with parameter link_url
This data shows you which "Related Articles" links readers click, what your most compelling anchor text is, and which content earns the most internal traffic.
Google Analytics 4 Reports Explained for Content Sites
Acquisition Reports – Understanding Your Traffic Sources
The Acquisition section tells you where visitors come from. For a new Hostinger-hosted website, you'll typically see:
- Organic Search: Google, Bing, and other search engines. This should grow over 6-12 months as your SEO improves.
- Direct: People who type your URL directly or come from bookmarks. Usually shows brand awareness growth.
- Referral: Links from other websites. Building quality backlinks drives referral traffic and SEO simultaneously.
- Organic Social: Free social media traffic from sharing your content.
For most affiliate sites, the goal is growing Organic Search to 60%+ of total traffic. Combine this data with our keyword research guide and SEO tips to target the right search queries.
Engagement Reports – Understanding Reader Behaviour
- Engaged sessions: Sessions where the user stayed 10+ seconds or viewed 2+ pages or converted. High engaged session rate = your content satisfies visitors.
- Average engagement time: Time users actively interact with your pages (GA4 only counts active engagement, not idle time). Under 30 seconds is a warning sign.
- Views by page: Your most-visited pages. Spot your "star performers" and link to them frequently from other content.
Monetization Reports
If you connect Google AdSense to GA4 (available in Admin → Product Links → AdSense Links), you'll see ad revenue data alongside traffic data. This helps you understand which content earns the most AdSense revenue per page view — crucial for optimising your editorial calendar. Our Google AdSense guide covers monetization strategy in detail.
Using GA4 Data to Improve Your Hostinger Site
Finding Slow Pages That Need Optimization
GA4 alone doesn't show page speed data — but combined with Google Search Console's Core Web Vitals report, you can identify slow pages. For each slow page, investigate via Hostinger's hPanel → Websites → Performance section, which shows server response times per URL.
Common fixes for slow WordPress pages on Hostinger:
- Enable LiteSpeed Cache if not already active
- Compress and resize images before uploading
- Defer loading of YouTube embeds (use a facade plugin)
- Audit and deactivate unnecessary WordPress plugins
- Check if PHP version is 8.1+ in hPanel
More speed optimization tips in our Hostinger speed optimization guide and WordPress speed guide.
Identifying High-Value Content Opportunities
- In GA4, go to Reports → Engagement → Pages and Screens
- Sort by Sessions descending — your top traffic pages
- For each high-traffic page: check average engagement time. If it's high (over 2 minutes), that topic resonates — create more content like it
- For high-traffic pages with low engagement time: your content isn't meeting searcher intent. Rewrite or expand it
Understanding Your Audience Location for AdSense Optimisation
AdSense CPM (revenue per 1000 views) varies enormously by geography:
- US visitors: $3-15 CPM depending on niche
- UK/Australia: $2-10 CPM
- India/Pakistan: $0.20-1.50 CPM
If your analytics show most traffic from low-CPM countries, focus your SEO and content strategy on search terms that attract US/UK searchers. Hosting-related content naturally attracts Western audiences who pay higher rates for web hosting. This is why Hostinger-related affiliate content is particularly valuable — English-language hosting searches come predominantly from high-CPM regions.
Google Search Console Integration: The Missing Piece
Google Analytics tells you what happens on your site. Google Search Console tells you how you appear in Google search. Together, they give you the complete picture.
Setting Up Search Console
- Go to search.google.com/search-console
- Add property → URL prefix → enter your site URL
- Verify ownership (easiest via Google Tag Manager or Site Kit)
- Submit your sitemap: yourdomain.com/sitemap.xml (WordPress generates this automatically with Yoast or Rank Math)
Connecting Search Console to GA4
- In GA4 → Admin → Product Links → Search Console Links
- Click Link and select your Search Console property
- Choose the web stream to associate
After linking, you'll see a new "Search Console" section under Acquisition in GA4, showing keyword data — which Google search queries bring visitors, your average position, click-through rate, and impressions. This is the most valuable SEO data available and it's completely free. Use it with our how to rank on Google guide to systematically improve search visibility.
GA4 Privacy and GDPR Compliance
If your Hostinger website has visitors from the European Union (or anywhere with GDPR-like laws), you need a cookie consent mechanism before loading Google Analytics.
Simple Cookie Consent Setup
- Install a cookie consent plugin in WordPress (Cookiebot, Cookie Notice, or GDPR Cookie Consent)
- Configure it to block GA4 until the visitor consents
- Display the consent banner on first visit
In GA4, you can also enable "Consent Mode" which allows GA4 to collect aggregated, cookieless data even from users who haven't consented — helpful for understanding traffic patterns without violating privacy regulations.
Data Retention Settings
GA4 defaults to 2 months of user data retention. For most site analysis, 14 months is better — go to Admin → Data Settings → Data Retention → set to 14 months. This has no impact on aggregate reports but allows you to analyse user behaviour over longer periods.
Troubleshooting Common GA4 Issues on Hostinger WordPress
GA4 data not matching Hostinger's built-in stats
Expect discrepancies — this is normal. Hostinger counts all server requests including bots and crawlers. GA4 only counts real user sessions with JavaScript execution. GA4 data will always be lower, and is the more accurate measure of real human traffic.
Bounce rate showing 0% in GA4
GA4 replaced "bounce rate" with "engagement rate" and eliminated the old bounce rate metric. If you see 0% bounce rate, you've installed GA4 correctly — that's expected. Instead, look at "Engaged sessions" percentage as your engagement quality metric.
GA4 showing wrong traffic sources (everything as Direct)
This usually happens when referring websites don't pass UTM parameters and GA4 can't identify the source. Fix by:
- Adding UTM parameters to all your social media links
- Setting up referral exclusions for your own domains in GA4 Admin
- Verifying the GA4 tag loads on every page (check with GA4 Debugger Chrome extension)
Building a Weekly Analytics Review Habit
Data is only useful if you act on it. Establish a 20-minute weekly analytics review:
- Monday: Check Real-Time report — any unusual traffic spikes or drops?
- Tuesday: Review Acquisition → Traffic Acquisition from previous week. Any new referral sources? Any drop in organic search?
- Wednesday: Review top 10 pages by engagement time. What topics are readers loving?
- Thursday: Check conversion data — how many affiliate link clicks? Which pages drove them?
- Friday: Review Search Console performance — any keywords improving or declining in position?
This weekly habit, combined with consistent content publishing and the strategies in our how to make money blogging guide, compounds into big traffic and income growth over 12-24 months.
Google Analytics Mobile Apps
Monitor your Hostinger site's traffic on the go:
- Google Analytics app (iOS/Android): Real-time stats, key reports, alerts for traffic anomalies
- Hostinger app (iOS/Android): Server uptime monitoring, basic hPanel access, support chat
Running both apps means you can monitor both hosting performance and traffic analytics from your phone — handy when you publish new content and want to track its initial performance in real-time.