Karachi, Pakistan Mon–Sat: 10AM–7PM PKT
Home Services
Design & Development
UI/UX Design Web Development WordPress Development Responsive Web Design Corporate Website Landing Pages / Microsites E-Commerce Solutions Mobile App Development
Marketing & Growth
SEO Services Content Marketing Social Media Marketing PPC / Google Ads Branding & Creative Speed & Performance
Hosting & Support
Web Hosting Maintenance & Support
Portfolio
Website Design Logo & Graphics
Clients About Blog Free Tools Get a Quote
SEO & Speed Guide

How to Set Up Google Analytics 4 (GA4): Step-by-Step Guide

Create a GA4 property, install the Google tag, fix the key settings, and track form submissions, WhatsApp clicks and phone calls as key events.

GA4 setup: Google Analytics 4 dashboard with key events

To set up Google Analytics 4 (GA4), create a GA4 property, add a web data stream for your domain, and install the Google tag (a measurement ID starting with G-) on every page, either directly, through Google Tag Manager or with a plugin such as Site Kit. Then turn on enhanced measurement, mark your enquiries and sales as key events, raise data retention to 14 months, filter out your own visits and link Search Console. Also, this guide walks through each step and shows how to track WhatsApp clicks, form submissions and phone calls. In addition, this guide explains GA4 setup step by step.

Key takeaways
  • Install the tag once. Duplicate tags double-count page views.
  • Change data retention from 2 months to 14 months straight away; it does not apply backwards.
  • Mark the actions that matter, such as form submits and WhatsApp clicks, as key events.
  • Link Search Console so you can see search queries next to on-site behaviour.

Step 1: Create the account, property and data stream

  1. Go to analytics.google.com and sign in with a Google account the business owns, not a freelancer's personal account.
  2. Open Admin → Create → Property. Set the time zone to Pakistan (GMT+5) and currency to PKR so reports match your business day.
  3. Choose Web as the platform and enter your domain to create a data stream.
  4. Copy the Measurement ID (looks like G-AB12CD34EF).

Step 2: Install the Google tag

Choose one method:

MethodBest for
Direct gtag.js snippetCustom-coded sites with a shared header template
Google Tag ManagerSites that need many tags (Meta Pixel, Google Ads, events) managed without code changes
Site Kit by Google or an SEO pluginWordPress sites without a developer

The direct snippet goes immediately after the opening <head> tag on every page:

<script async src="https://www.googletagmanager.com/gtag/js?id=G-AB12CD34EF"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-AB12CD34EF');
</script>

Verify it with Reports → Realtime: open your site in another browser and you should appear within a minute. The free Tag Assistant extension also confirms the tag fires once.

Step 3: Check enhanced measurement

In Admin → Data streams → your stream, enhanced measurement automatically tracks page views, scrolls (90 percent depth), outbound clicks, site search, video engagement and file downloads. Leave it on, but check that "Form interactions" does not create noisy events on your site; it is often inaccurate with custom forms.

Step 4: Fix the important settings

  • Data retention: Admin → Data collection and modification → Data retention → set event data to 14 months. The default is 2 months, which limits exploration reports.
  • Internal traffic: Admin → Data streams → Configure tag settings → Define internal traffic. Add your office IP, then activate the "Internal Traffic" data filter under Data filters.
  • Unwanted referrals: add payment gateways (for example your JazzCash or card processor domain) so returning buyers are not counted as new referral visits.
  • Google signals: optional; enables cross-device reporting with thresholds on small sites.

Step 5: Track enquiries as key events

Google renamed "conversions" to key events in 2024. In fact, for a service business, the key events are usually form submissions, WhatsApp clicks and phone taps. Send a custom event when they happen:

// After your form is successfully submitted
gtag('event', 'generate_lead', { form_name: 'contact', value: 1, currency: 'PKR' });

// WhatsApp and phone links
document.addEventListener('click', (e) => {
  const a = e.target.closest('a[href]');
  if (!a) return;
  if (a.href.includes('wa.me') || a.href.includes('api.whatsapp.com')) {
    gtag('event', 'whatsapp_click', { link_url: a.href });
  } else if (a.href.startsWith('tel:')) {
    gtag('event', 'phone_click', { link_url: a.href });
  }
});

Then in Admin → Events, find each event after it has fired once and toggle Mark as key event. For stores, WooCommerce and Shopify integrations send the recommended ecommerce events (view_item, add_to_cart, begin_checkout, purchase) automatically.

In Admin → Product links, link Search Console to see queries and landing pages inside GA4, and link Google Ads so key events can be imported as conversions for bidding. If you have not set up Search Console yet, follow our Search Console guide.

If you have visitors from the EU or UK, Google requires Consent Mode v2 with a consent banner for ads features. For a Pakistan-only audience it is still good practice to have a clear privacy policy that mentions analytics.

GA4 setup: the reports worth checking monthly

  • Acquisition → Traffic acquisition: where visitors come from (organic search, social, direct, referral).
  • Engagement → Pages and screens: which pages get views and engagement time.
  • Engagement → Landing page: which entry pages bring key events.
  • Key events by source: which channels actually bring enquiries, not just visits.

Common GA4 setup mistakes

  • Installing the tag twice (theme plus plugin), which doubles page views and halves bounce-like metrics.
  • Leaving the property on a developer's personal Google account.
  • Forgetting data retention until old data is gone.
  • Marking page views of the contact page as a key event instead of the actual submission.

GA4 setup: frequently asked questions

GA4 setup: is Google Analytics 4 free?

Yes. The standard version is free; GA4 360 is a paid enterprise version.

Does GA4 slow down my website?

Slightly. The tag loads asynchronously, so the effect is small, but many extra tags through Tag Manager can affect INP.

Why do GA4 numbers differ from Search Console?

Search Console counts clicks in Google; GA4 counts sessions that loaded the tag. Ad blockers, consent refusals and slow pages create gaps.

Related guides: Local SEO in Pakistan, Why Is My Website Not Showing on Google? 10 Causes and Fixes, How to Add Google Maps to Your Website (Free and Step by Step).

Want tracking set up properly?

We set up GA4, Tag Manager and conversion tracking for Google Ads and social campaigns, so you know which channel brings real enquiries. Contact us.

Written by the ItsWebExpert team, a web design and development company in Karachi building websites, online stores and apps for businesses across Pakistan.

Ask a Question on WhatsApp

Let's Build Your
Next Website

Tell us what you need and we will reply within 24 hours with honest advice and a fixed quote.

Trusted by our clients, rated 5.0 on Google

5.0 11 Google reviews Read all →
I had a great experience working with Waqas and his team. We got some website development and SEO work done, and I'm quite satisfied with the overall results. They understood our requirements, suggested improvements, and handled the work professionally. What I appreciated most was their communication, attention to detail, and willingness to make changes whenever needed. Waqas is very cooperative, and the team knows what they're doing. Definitely a good choice for anyone looking for reliable web development and digital marketing services.
HUHafiz Ubaid Google review · Nov 2026
I was referred to their company by someone, and I'm really glad I connected with them. Waqas, the CEO, is a very humble and professional person who leads his team exceptionally well. Their expertise in digital marketing, web development, and custom development services is impressive. The team is skilled, responsive, and committed to delivering quality work. Had a really positive experience working with them. Highly recommended!
MRMuhammad Rafeeq Google review · Nov 2026
I had hired them for my client's task of Custom Wordpress plugin development. and many other tasks later on.. Waqas is super fast and sharp.. I know him since 2019.. I really really appreciate his work. Highly recommended..
RFRaheela Farooqui Google review · Nov 2026
I had a positive experience working with Waqas and his team. They provided excellent support with graphic design and social media management. The team was professional, responsive, and attentive to our needs. They understood our vision and delivered quality work on time. Highly recommended for anyone looking for creative and reliable digital services.
URUsman Rock Google review · Nov 2026
I really appreciate their dedication and professionalism. They have a good understanding of SEO, social media marketing, and online brand growth. Communication is smooth, and the quality of work is impressive. Definitely a great team to work with!
SSSameer Sarafaraz Google review · Nov 2026
I've had a great experience working with their team. They understand digital marketing very well and know how to improve online visibility through effective SEO and marketing strategies. Professional, responsive, and reliable. Highly recommended! 🙌❤️
MNMohammad naveed Google review · Nov 2026
I had a really good experience with web Experts. Everything was easy to understand, well-organized, and user-friendly. I appreciate the effort and attention to detail that has gone into creating this platform. It was a smooth and pleasant experience, and I would definitely recommend it to others. Keep up the great work!
SSShazia shaikh Google review · Nov 2026
Extremely professional and committed I am Extremely happy to work with them I wish them best of luck Best Regards M. Salman Farooqui
SFSalman Farooqui Google review · Nov 2026
Outstanding experience! Quality, professionalism, and customer service are all excellent. Keep up the great work!
ARabdul rehman Google review · Nov 2026
Excellent service and a great experience. The team is professional, helpful, and dedicated. Highly recommended!
MEmustafa emb Google review · Nov 2026