Title: GA Google Analytics – Connect Google Analytics to WordPress
Author: Jeff Starr
Published: <strong>13 نوامبر 2012</strong>
Last modified: 27 مارس 2026

---

جستجوی افزونه‌ها

![](https://ps.w.org/ga-google-analytics/assets/banner-772x250.jpg?rev=1926485)

![](https://ps.w.org/ga-google-analytics/assets/icon-256x256.png?rev=2053004)

# GA Google Analytics – Connect Google Analytics to WordPress

 توسط [Jeff Starr](https://profiles.wordpress.org/specialk/)

[دانلود](https://downloads.wordpress.org/plugin/ga-google-analytics.20260209.zip)

 * [جزئیات](https://fa.wordpress.org/plugins/ga-google-analytics/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/ga-google-analytics/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/ga-google-analytics/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/ga-google-analytics/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/ga-google-analytics/)

## توضیحات

> ✨ Connects Google Analytics to WordPress
>  ✨ Easily add Google Analytics 4 to
> your web pages

This plugin enables Google Analytics for your entire WordPress site. Lightweight
and fast with plenty of great features.

### 🔥 Enable Google Analytics 4

Steps to enable Google Analytics 4:

 1. Follow [this guide](https://support.google.com/analytics/answer/9304153) to create
    a GA4 account
 2. During account creation, you’ll get a tracking (measurement) ID
 3. Add your new tracking ID to the plugin setting, “GA Tracking ID”
 4. Select “GA4” for the plugin setting, “Tracking Method”

Save changes and done. Wait 24-48 hours before viewing collected data in your GA
account.

### 🔥 GA Tracking Options

Here are the tracking methods available with this plugin:

 * [GA4](https://support.google.com/analytics/answer/10089681) / Google Analytics
   4 (default)
 * [Universal Analytics](https://support.google.com/analytics/answer/11583528) (
   deprecated)
 * Legacy Tracking (deprecated)

**Note:** GA4 is recommended. Google has deprecated/disabled all other tracking 
options.

### 🔥 GA Feature Support

 * Supports [Google Analytics 4](https://support.google.com/analytics/answer/9304153)
 * Supports [Display Advertising](https://support.google.com/analytics/answer/2444872)
 * Supports [Enhanced Link Attribution](https://support.google.com/analytics/answer/7377126)
 * Supports [IP Anonymization](https://support.google.com/analytics/answer/2763052)
 * Supports [Force SSL](https://support.google.com/analytics/answer/6385009)
 * Supports [Google Optimize](https://support.google.com/analytics/answer/12979939)
 * Supports [Consent Signals](https://support.google.com/analytics/answer/14275483)
 * Supports Tracker Objects (Universal Analytics)
 * Supports User Opt-Out (Universal Analytics)

Also supports tracking links and conversions via the Custom Code setting. Learn 
more about [Google Analytics](https://www.google.com/analytics/).

### 🔥 General Features

 * Blazing fast performance
 * Does one thing and does it well
 * Drop-dead simple and easy to use
 * Regularly updated and “future proof”
 * Stays current with the latest tracking code
 * Includes tracking code in header or footer
 * Includes tracking code on all WordPress web pages
 * Includes option to add your own custom markup
 * Sleek plugin Settings page with toggling panels
 * Option to disable tracking of admin-level users
 * Option to enable page tracking in the Admin Area
 * Works with or without Gutenberg Block Editor
 * Easy to customize the tracking code
 * More features available in the [Pro version »](https://plugin-planet.com/ga-google-analytics-pro/)

This is a lightweight plugin that inserts the required GA tracking code. To view
your site statistics, visit your Google Analytics account.

### 🔥 Pro Version

[GA Google Analytics Pro](https://plugin-planet.com/ga-google-analytics-pro/) includes
the same features as the free version, PLUS the following:

 * Visitor Opt-Out Box (frontend UI)
 * Configure multiple tracking codes
 * Live Preview of all tracking codes
 * Choose location of multiple tracking codes
 * Supports Custom Code in header or footer
 * Disable tracking of all logged-in users
 * Disable Tracking for any Post IDs, User Roles, Post Types
 * Disable Tracking for Search Results and Post Archives
 * Display Opt-Out Box automatically or via shortcode
 * Complete Inline Help/Documentation
 * Priority plugin help and support

🚀 Learn more and get [GA Pro »](https://plugin-planet.com/ga-google-analytics-pro/)

### Privacy

**User Data:** This plugin does not collect any user data. Even so, the tracking
code added by this plugin is used by Google to collect all sorts of user data. You
can learn more about Google Privacy [here](https://policies.google.com/privacy).

**Cookies:** This plugin uses simple cookies for the visitor Opt-Out Box to remember
user preference for opt-in or out of Google Analytics.

**Services:** This plugin does not connect to any third-party locations or services,
but it does enable Google to collect all sorts of data.

GA Google Analytics is developed and maintained by [Jeff Starr](https://x.com/perishable),
15-year [WordPress developer](https://plugin-planet.com/) and [book author](https://books.perishablepress.com/).

### Support development

I develop and maintain this free plugin with love for the WordPress community. To
show support, you can [make a donation](https://monzillamedia.com/donate.html) or
purchase one of my books:

 * [The Tao of WordPress](https://wp-tao.com/)
 * [Digging into WordPress](https://digwp.com/)
 * [.htaccess made easy](https://htaccessbook.com/)
 * [WordPress Themes In Depth](https://wp-tao.com/wordpress-themes-book/)
 * [Wizard’s SQL Recipes for WordPress](https://books.perishablepress.com/downloads/wizards-collection-sql-recipes-wordpress/)

And/or purchase one of my premium WordPress plugins:

 * [BBQ Pro](https://plugin-planet.com/bbq-pro/) – Blazing fast WordPress firewall
 * [Blackhole Pro](https://plugin-planet.com/blackhole-pro/) – Automatically block
   bad bots
 * [Banhammer Pro](https://plugin-planet.com/banhammer-pro/) – Monitor traffic and
   ban the bad guys
 * [GA Google Analytics Pro](https://plugin-planet.com/ga-google-analytics-pro/)–
   Connect WordPress to Google Analytics
 * [Head Meta Pro](https://plugin-planet.com/head-meta-pro/) – Ultimate Meta Tags
   for WordPress
 * [Simple Ajax Chat Pro](https://plugin-planet.com/simple-ajax-chat-pro/) – Unlimited
   chat rooms
 * [USP Pro](https://plugin-planet.com/usp-pro/) – Unlimited front-end forms

Links, tweets and likes also appreciated. Thank you! 🙂

## عکس‌های صفحه

 * [[
 * GA Google Analytics: Plugin Settings (default)
 * [[
 * GA Google Analytics: Plugin Settings (expanded)

## نصب

### How to install the plugin

 1. Upload the plugin to your blog and activate
 2. Visit the settings to configure your options

After configuring your settings, you can verify that GA tracking code is included
by viewing the source code of your web pages.

**Note:** this plugin adds the required GA code to your web pages. In order for 
the code to do anything, it must correspond to an active, properly configured Google
Analytics account. Learn more at the [Google Analytics Help Center](https://support.google.com/analytics/).

[More info on installing WP plugins »](https://wordpress.org/documentation/article/manage-plugins/#installing-plugins-1)

### How to use the plugin

To enable Google Analytics tracking (GA4) on your site, follow these steps:

 1. Follow [this guide](https://support.google.com/analytics/answer/9304153) to create
    a GA 4 account
 2. During account creation, you’ll get a tracking (measurement) ID
 3. Add your new tracking ID to the plugin setting, “GA Tracking ID”
 4. Select “GA4” for the plugin setting, “Tracking Method”
 5. Configure any other plugin settings as desired (optional)

Save changes and done. After 24-48 hours, you can log into your Google Analytics
account and view your site statistics.

**\* Notes:**

The “Tracking ID” also may be referred to as “Measurement ID”, “Property ID”, or“
Tag ID”.

This plugin adds the required GA code to your web pages. In order for the code to
do anything, it must correspond to an active, properly configured Google Analytics
account. Learn more at the [Google Analytics Help Center](https://support.google.com/analytics/).

Also note that it can take 24-48 hours after adding the tracking code before any
analytical data appears in your [Google Analytics account](https://developers.google.com/analytics/).
To check that the GA tacking code is included properly, examine the source code 
of your web pages. Learn more at the [Google Analytics Help Center](https://support.google.com/analytics/).

### Upgrading Analytics

Google Analytics tracking methods [change over time](https://onward.justia.com/history-of-google-analytics/).
First there was `urchin.js`, then `ga.js`, `analytics.js`, and then `gtag.js`. Now
there is the latest and greatest, “GA4” (Google Analytics 4). If you are using an
older version (anything other than GA4) and want to upgrade, check out this [upgrade guide](https://support.google.com/analytics/answer/10759417)
from Google.

### Plugin Upgrades

Visit the WordPress Plugins screen, locate the plugin, and click “Update” 🙂

### Restore Default Options

To restore default plugin options, either uninstall/reinstall the plugin, or visit
the plugin settings > Restore Default Options.

### Uninstalling

This plugin cleans up after itself. All plugin settings will be removed from the
WordPress database when the plugin is deleted via the WP Plugins screen. Your collected
GA data will remain in your Google account.

### Pro Version

Want more control over your GA Tracking codes? With awesome features like Opt-Out
Box and Code Previews? Check out [GA Pro »](https://plugin-planet.com/ga-google-analytics-pro/)

### Like the plugin?

If you like GA Google Analytics, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/ga-google-analytics/reviews/?rate=5#new-post).
It helps to keep development and support going strong. Thank you!

## سوالات متداول

### How to enable Google Analytics 4?

Check out the top of this page, first section provides the steps to add GA4 to your
site.

### I am confused about all the different tracking methods?

This article should help to get a better idea of the changes: [History of Google Analytics](https://onward.justia.com/history-of-google-analytics/)

### Tracking code is not displayed in source code?

If you check the source code of your pages and don’t see the GA tracking code, check
the following:

 * Check that your theme includes the hooks, `wp_head` and `wp_footer`
 * If you are using a caching plugin, try clearing the cache

If the GA tracking code still is not displayed, most likely there is interference
from another plugin or theme. In this case, the best way to resolve the issue is
to do some basic [WordPress troubleshooting](https://perishablepress.com/how-to-troubleshoot-wordpress/).

### Google Analytics says tracking code is not detected?

You need to wait 24-48 hours (or longer) for Google to collect some data. Just takes
time for Googlebot to crawl your pages, collect and process data, etc. For more 
information, check out the [Google Analytics Help Center](https://support.google.com/analytics/thread/293486955/how-long-does-it-take-for-data-to-be-displayed-in-analytics).

### Can I filter the output of the “Custom GA Code” setting?

Yes, you can use the `gap_custom_code` filter hook.

### How to implement Google Optimize?

Here are the steps:

 1. Enable Universal Analytics in the plugin settings
 2. Add the Optimize plugin (e.g., `ga('require', 'GTM-XXXXXX');`) to the setting, “
    Custom GA Code”
 3. Add the Page Hiding (flicker) snippet to the setting, “Custom <head> Code”
 4. Enable the setting, “Custom <head> Location”

Done! You can view the source code of your web pages to verify the results.

More info about [Google Optimize](https://support.google.com/analytics/answer/12979939).

### How to enable Opt-out of tracking?

Here are the steps:

 1. Add the following code to the plugin setting, “Custom Code”: `<script>window['ga-
    disable-UA-XXXXX-Y'] = true;</script>`
 2. Check the box to enable the setting, “Custom Code Location”.

Done! You can view the source code of your web pages to verify the results.

### How to disable the “auto” parameter in ga(create)?

By default the plugin includes the `auto` parameter in the tracking code:

    ```
    ga('create', 'GA-123456789000', 'auto');
    ```

However some tracking techniques (such as Site Speed Sample Rate) require replacing
the `auto` parameter. To do it:

First disable the `auto` parameter by adding the following code to WordPress functions
or [custom plugin](https://digwp.com/2022/02/custom-code-wordpress/):

    ```
    // GA Google Analytics - Disable auto parameter
    function ga_google_analytics_enable_auto($enable) { return false; }
    add_filter('ga_google_analytics_enable_auto', 'ga_google_analytics_enable_auto');
    ```

Now that `auto` is disabled, you can replace it with your own parameter(s). For 
example, to implement Universal Analytics Site Speed Sample Rate, enter the following
code in the plugin setting “Custom Tracker Objects”:

    ```
    {'siteSpeedSampleRate': 100}
    ```

Save changes and done. The resulting tracking code will now look like this:

    ```
    ga('create', 'GA-123456789000', {'siteSpeedSampleRate': 100});
    ```

So can adjust things as needed to add any parameters that are required.

### How to add Google Ads Conversion Tracking tags

Check [this post](https://wordpress.org/support/topic/how-to-add-google-ads-conversion-tracking/)
by [@mlipenk](https://wordpress.org/support/users/mlipenk/).

### How to implement Anonymize?

 1. Add to “Custom Tracker Objects” setting: `{ 'anonymize_ip': true }`
 2. Save changes and done.

### Got a question?

To ask a question, suggest a feature, or provide feedback, [contact me directly](https://plugin-planet.com/support/#contact).
Learn more about [Google Analytics](https://www.google.com/analytics/).

## نقد و بررسی‌ها

![](https://secure.gravatar.com/avatar/4ba26958cee0e6820452b1f8b8baa8d9054d53af519b84907e92cd907b5a4745?
s=60&d=retro&r=g)

### 󠀁[Disappointing Experience – Doesn’t Work as Expected](https://wordpress.org/support/topic/disappointing-experience-doesnt-work-as-expected/)󠁿

 [deepcst](https://profiles.wordpress.org/deepcst/) 15 دسامبر 2024

I installed the plugin hoping for a seamless solution to handle Google Analytics
tracking and GDPR/EU consent management. Unfortunately, the plugin failed to deliver
on multiple fronts: Connection Issues: It could not connect properly with my website,
even after following all setup instructions. Google Analytics Integration: The tracking
code was not implemented correctly, resulting in no data being sent to Google Analytics.
Consent Management Failure: The plugin struggled to handle GDPR/EU cookie consent
properly. Despite configuration, consent wasn’t reliably applied, leaving the compliance
questionable. Overall, this plugin turned out to be a time-consuming and frustrating
experience. I had to manually intervene to fix what it claimed to automate. I cannot
recommend this plugin if you’re looking for a reliable and hassle-free solution.

![](https://secure.gravatar.com/avatar/c36b90f13516eae2ace56149e82a16ac05de6a6302cbd1af49d245e3893fea15?
s=60&d=retro&r=g)

### 󠀁[Lost](https://wordpress.org/support/topic/lost-18/)󠁿

 [Ken](https://profiles.wordpress.org/ken32541/) 22 نوامبر 2024

😀

![](https://secure.gravatar.com/avatar/af8042309a4be2a9e144ced5ff8610ea9a47967303d42a960bfd7d6bab0bb38d?
s=60&d=retro&r=g)

### 󠀁[It just works](https://wordpress.org/support/topic/it-just-works-830/)󠁿

 [EBurden](https://profiles.wordpress.org/eburden/) 23 آگوست 2024

Great plugin. It just adds the Google tracking code. No bloat. No junk. Awesome.

![](https://secure.gravatar.com/avatar/71721480f769e0c4c794c0a98077fbfc818b5677ddeb7cd6b7c6370fe76e37e8?
s=60&d=retro&r=g)

### 󠀁[easy](https://wordpress.org/support/topic/easy-683/)󠁿

 [piema](https://profiles.wordpress.org/piema/) 19 می 2024

fantastic plugin mega dzięki

![](https://secure.gravatar.com/avatar/fba4ccca03abf047fb1adfa894c1b4e71c97cbb014ba0a53a1282470985406a2?
s=60&d=retro&r=g)

### 󠀁[Lightweight and disable tracking of Admin-level users](https://wordpress.org/support/topic/lightweight-and-disable-tracking-of-admin-level-users/)󠁿

 [matutino](https://profiles.wordpress.org/matutino/) 14 مارس 2024

Much lighter and less disturbing than MonsterInsights plugin while also can disable
tracking of Admin-level users. It’s what I was looking for

![](https://secure.gravatar.com/avatar/b6fb302a59db3635223cfee91432f073b577e4722cbc404a2f1f8e1a8d23e9d5?
s=60&d=retro&r=g)

### 󠀁[Can collect woocommerce data?](https://wordpress.org/support/topic/can-collect-woocommerce-data/)󠁿

 [magicmax67](https://profiles.wordpress.org/magicmax67/) 14 دسامبر 2023 1 پاسخ

This plugin has not any option for track ecommerce data.

 [ خواندن تمامی 158 نقد و بررسی‌ ](https://wordpress.org/support/plugin/ga-google-analytics/reviews/)

## توسعه دهندگان و همکاران

“GA Google Analytics – Connect Google Analytics to WordPress” نرم افزار متن باز 
است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

 *   [ Jeff Starr ](https://profiles.wordpress.org/specialk/)

“GA Google Analytics – Connect Google Analytics to WordPress” به 11 زبان ترجمه شده
است. با تشکر از [مترجمین](https://translate.wordpress.org/projects/wp-plugins/ga-google-analytics/contributors)
برای همکاری و کمک‌هایشان.

[ترجمه “GA Google Analytics – Connect Google Analytics to WordPress” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/ga-google-analytics)

### علاقه‌ مند به توسعه هستید؟

[Browse the code](https://plugins.trac.wordpress.org/browser/ga-google-analytics/),
check out the [SVN repository](https://plugins.svn.wordpress.org/ga-google-analytics/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/ga-google-analytics/)
by [RSS](https://plugins.trac.wordpress.org/log/ga-google-analytics/?limit=100&mode=stop_on_copy&format=rss).

## گزارش تغییرات

_Thank you to everyone who shares feedback for GA Google Analytics!_

If you like GA Google Analytics, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/ga-google-analytics/reviews/?rate=5#new-post).
It helps to keep development and support going strong. Thank you!

> ✨ Pro version available! Check out [GA Pro »](https://plugin-planet.com/ga-google-analytics-pro/)

**20260209**

 * Updates plugin settings page
 * Improves readme.txt documentation
 * Generates new language template
 * Tests on PHP 8.4 and 8.5
 * Tests on WordPress 6.9 + 7.0 (nightly)

Full changelog @ [https://plugin-planet.com/wp/changelog/ga-google-analytics.txt](https://plugin-planet.com/wp/changelog/ga-google-analytics.txt)

## اطلاعات

 *  نگارش **20260209**
 *  Last updated **1 هفته پیش**
 *  نصب‌های فعال **400,000+**
 *  نگارش وردپرس ** 4.7 یا بالاتر **
 *  Tested up to **7.0**
 *  نگارش PHP ** 5.6.20 یا بالاتر **
 *  زبان‌ها
 * [Dutch](https://nl.wordpress.org/plugins/ga-google-analytics/)، [English (US)](https://wordpress.org/plugins/ga-google-analytics/)،
   [French (France)](https://fr.wordpress.org/plugins/ga-google-analytics/)، [Galician](https://gl.wordpress.org/plugins/ga-google-analytics/)،
   [Hungarian](https://hu.wordpress.org/plugins/ga-google-analytics/)، [Russian](https://ru.wordpress.org/plugins/ga-google-analytics/)،
   [Spanish (Chile)](https://cl.wordpress.org/plugins/ga-google-analytics/)، [Spanish (Colombia)](https://es-co.wordpress.org/plugins/ga-google-analytics/)،
   [Spanish (Ecuador)](https://es-ec.wordpress.org/plugins/ga-google-analytics/)،
   [Spanish (Mexico)](https://es-mx.wordpress.org/plugins/ga-google-analytics/)،
   [Spanish (Spain)](https://es.wordpress.org/plugins/ga-google-analytics/)، و [Spanish (Venezuela)](https://ve.wordpress.org/plugins/ga-google-analytics/).
 *  [به زبان خودتان ترجمه کنید](https://translate.wordpress.org/projects/wp-plugins/ga-google-analytics)
 * Tags
 * [analytics](https://fa.wordpress.org/plugins/tags/analytics/)[google](https://fa.wordpress.org/plugins/tags/google/)
   [google analytics](https://fa.wordpress.org/plugins/tags/google-analytics/)[statistics](https://fa.wordpress.org/plugins/tags/statistics/)
   [tracking](https://fa.wordpress.org/plugins/tags/tracking/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/ga-google-analytics/advanced/)

## امتیازها

 4.9 از 5 ستاره.

 *  [  امتیاز 149 5-ستاره     ](https://wordpress.org/support/plugin/ga-google-analytics/reviews/?filter=5)
 *  [  امتیاز 3 4-ستاره     ](https://wordpress.org/support/plugin/ga-google-analytics/reviews/?filter=4)
 *  [  امتیاز 2 3-ستاره     ](https://wordpress.org/support/plugin/ga-google-analytics/reviews/?filter=3)
 *  [  امتیاز 1 2-ستاره     ](https://wordpress.org/support/plugin/ga-google-analytics/reviews/?filter=2)
 *  [  امتیاز 3 1-ستاره     ](https://wordpress.org/support/plugin/ga-google-analytics/reviews/?filter=1)

[افزودن ارزیابی من](https://wordpress.org/support/plugin/ga-google-analytics/reviews/#new-post)

[مشاهده همه بررسی‌ها](https://wordpress.org/support/plugin/ga-google-analytics/reviews/)

## مشارکت کنندگان

 *   [ Jeff Starr ](https://profiles.wordpress.org/specialk/)

## پشتیبانی

مشکلات حل شده در دو ماه گذشته:

     1 از 2

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/ga-google-analytics/)

## کمک مالی

آیا تمایل دارید از پیشرفت این افزونه حمایت کنید؟

 [ کمک مالی به این افزونه ](https://monzillamedia.com/donate.html)