Google Analytics 4 Setup Guide
Google Analytics 4 Setup Guide
Step 1: Create Google Analytics Account
- Go to Google Analytics
- Click “Start measuring”
- Sign in with your Google account
- Follow the setup wizard
Step 2: Create a Property
- Click “Create Property”
- Property name:
Sina Berk Golech - Academic Website
- Reporting time zone:
Europe/Berlin
- Currency:
Euro (€)
- Click “Next”
Step 3: Configure Business Information
- Business size:
Small business
- How do you plan to use Google Analytics: Select relevant options:
- Understand my users
- Improve my website
- Measure user engagement
- Click “Next”
Step 4: Create Data Stream
- Platform:
Web
- Website URL:
https://sinaberkgolech.github.io
- Stream name:
Academic Website
- Click “Create stream”
Step 5: Get Your Tracking ID
- After creating the stream, you’ll see your Measurement ID
- It will look like:
G-XXXXXXXXXX
- Copy this ID
Step 6: Update Your Website
- Open
_config.yml
in your website repository - Find the analytics section:
analytics: provider: "google-analytics-4" google: tracking_id: "G-XXXXXXXXXX" # Replace with your actual ID
- Replace
G-XXXXXXXXXX
with your actual Measurement ID - Save the file
Step 7: Test Analytics
- Deploy your website to GitHub Pages
- Visit your website
- Accept the cookie consent notice
- Check Google Analytics Real-Time reports to see if data is being collected
Step 8: Configure Academic Goals (Optional)
Set up Custom Events
Google Analytics will automatically track:
- Publication downloads (PDF files, papers)
- Project repository visits (GitHub links)
- CV downloads
- Theme toggle usage
- Academic profile clicks (Google Scholar, ORCID, PubMed)
- Research interest clicks
Create Custom Reports
- Go to Reports → Engagement → Events
- Look for custom events like:
publication_download
project_visit
cv_download
research_interest
Step 9: Privacy Compliance
Your website is already configured with:
- GDPR-compliant cookie consent
- Privacy policy page
- Opt-out mechanisms
- Data anonymization
Step 10: Monitor and Optimize
Key Metrics to Track:
- Most visited pages (publications, projects, skills)
- Research area interest (metabolomics, AMPs, computer vision)
- Geographic distribution of visitors
- Device types (desktop vs mobile)
- Referral sources (Google Scholar, LinkedIn, etc.)
Regular Reviews:
- Check analytics weekly/monthly
- Identify popular content
- Optimize based on user behavior
- Update privacy policy as needed
Troubleshooting
Analytics Not Working?
- Check if tracking ID is correct
- Verify cookie consent is accepted
- Check browser console for errors
- Ensure website is deployed with latest changes
No Data in Reports?
- Wait 24-48 hours for data to appear
- Check if ad blockers are disabled
- Verify Google Analytics is enabled in
_config.yml
- Test with Google Analytics Debugger extension
Support
If you need help:
- Google Analytics Help Center
- Google Analytics Community
- Contact: berk.golech@gmail.com
This setup provides comprehensive analytics for your academic website while maintaining GDPR compliance and user privacy.