Title: DCO Insert Analytics Code
Author: Denis Yanchevskiy
Published: <strong>16 בינואר 2016</strong>
Last modified: 28 ביולי 2021

---

חיפוש תוספים

תוסף זה **לא נבדק ב-3 הגרסאות הראשיות האחרונות של וורדפרס**. ייתכן והתוסף כבר לא
מתוחזק או נתמך על ידי יוצריו, וייתכן שיהיו לו בעיות תאימות בגרסות וורדפרס עדכניות
יותר.

![](https://ps.w.org/dco-insert-analytics-code/assets/icon.svg?rev=1806013)

# DCO Insert Analytics Code

 מאת [Denis Yanchevskiy](https://profiles.wordpress.org/denisco/)

[הורדה](https://downloads.wordpress.org/plugin/dco-insert-analytics-code.1.1.3.zip)

 * [פרטים](https://he.wordpress.org/plugins/dco-insert-analytics-code/#description)
 * [סקירות](https://he.wordpress.org/plugins/dco-insert-analytics-code/#reviews)
 *  [התקנה](https://he.wordpress.org/plugins/dco-insert-analytics-code/#installation)
 * [פיתוח](https://he.wordpress.org/plugins/dco-insert-analytics-code/#developers)

 [תמיכה](https://wordpress.org/support/plugin/dco-insert-analytics-code/)

## תיאור

DCO Insert Analytics Code is a WordPress plugin is intended for insert analytics
code(or any custom code) before </head> or after <body> or before </body>

#### אופן שימוש

After installation and activation, you can insert the necessary code to the respective
fields on the plugin settings page.
 [GitHub](https://github.com/yadenis/DCO-Insert-Analytics-Code)

#### אפשרויות

 * Before </head> code
 * After <body> code
 * Before </body> code

#### Filters list

**dco_iac_get_options**

Filter for hardcoding override plugin settings. You won't be able to edit them on
the settings page anymore when using this filter.

**dco_iac_insert_before_head**

Filter to change the code is inserted before </head>

**dco_iac_insert_before_head_show**

Filter to change show the code is inserted before </head>

**dco_iac_insert_after_body**

Filter to change the code is inserted after <body>

**dco_iac_insert_after_body_show**

Filter to change show the code is inserted after <body>

**dco_iac_insert_before_body**

Filter to change the code is inserted before </body>

**dco_iac_insert_before_body_show**

Filter to change show the code is inserted before </body>

**dco_iac_disable_do_shortcode**

Filter to disable shortcode processing in inserted codes

#### Examples of using filters

**Hardcoding override plugin settings**

    ```
    /*
    * $current - current plugin settings
    *
    * $options - plugin settings from database
    *
    * $default - default plugin settings
    */

    function custom_get_options($current, $options, $default) {
        $array = array(
            'before_head' => '<!-- before </head> -->',
            'before_head_show' => '0',
            'after_body' => '<!-- after <body> -->',
            'after_body_show' => '1',
            'before_body' => '<!-- before </body> -->',
            'before_body_show' => '2'
        );

        return $array;
    }

    add_filter('dco_iac_get_options', 'custom_get_options', 10, 3);
    ```

**Change before </head> code**

    ```
    /*
    * $code - value from "before </head>" setting
    */

    function custom_before_head_code( $code ) {
        return $code . '<!-- before <head> -->' . "\n";
    }

    add_filter( 'dco_iac_insert_before_head', 'custom_before_head_code' );
    ```

**Change before </body> code show**

    ```
    /*
    * $value - value from "before </body> show" setting
    */

    function custom_before_head_code( $value ) {
        return '2';
    }

    add_filter( 'dco_iac_insert_before_body_show', 'custom_before_body_show' );
    ```

**Disable shortcode processing in insert codes**

    ```
    add_filter('dco_iac_disable_do_shortcode', '__return_true');
    ```

## צילומי מסך

 * [[
 * אפשרויות page
 * [[
 * Example page

## התקנה

 1. Upload `dco-insert-analytics-code` folder to the `/wp-content/plugins/` directory
 2. יש להפעיל את התוסף דרך התפריט ’תוספים‘ בוורדפרס

## שאלות נפוצות

### I put the code on the plugin settings page, but it does not appear on the site. What could be the reason?

 * For correct work plugin your theme must support [wp_head action hook](https://developer.wordpress.org/reference/functions/wp_head/)
   and [wp_footer action hook](https://developer.wordpress.org/reference/functions/wp_footer/).
 * If you are using plugins for caching you need to clear the cache to apply the
   changes.

## סקירות

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

### 󠀁[Never edit theme files anymore](https://wordpress.org/support/topic/never-edit-theme-files-anymore/)󠁿

 [Yui](https://profiles.wordpress.org/fierevere/) 3 באפריל 2021

Very light plugin that will make editing theme parts unnecessary. * header.php *
footer.php Safe! No possibility to break things, can be used by newbies. Suitable
for anything. * counters, analytics code * site verification with <meta> tags * 
adding loading additional scripts and styles or using them inline. * much more.

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

### 󠀁[Мультисайт вп](https://wordpress.org/support/topic/%d0%bc%d1%83%d0%bb%d1%8c%d1%82%d0%b8%d1%81%d0%b0%d0%b9%d1%82-%d0%b2%d0%bf/)󠁿

 [igor420](https://profiles.wordpress.org/igor420/) 8 באוגוסט 2019 1 reply

Не хватает поддержки мультисайтовости. Очень просим

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

### 󠀁[Excellent Plugin](https://wordpress.org/support/topic/excellent-plugin-4871/)󠁿

 [blmbmj](https://profiles.wordpress.org/blmbmj/) 10 במאי 2019

Allows precise insertion of code at many template locations. Light, simply and works
well! Thank you.

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

### 󠀁[Great!](https://wordpress.org/support/topic/great-9279/)󠁿

 [bobbobbius](https://profiles.wordpress.org/bobbobbius/) 19 בפברואר 2019

i like it

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

### 󠀁[Simple & Functional](https://wordpress.org/support/topic/simple-functional-9/)󠁿

 [jc123](https://profiles.wordpress.org/jc123/) 24 בנובמבר 2018

Thank you.

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

### 󠀁[Works with the plugin Elementor Page Builder](https://wordpress.org/support/topic/works-with-the-plugin-elementor-page-builder/)󠁿

 [Vad](https://profiles.wordpress.org/vadym1/) 13 באפריל 2018

The code for analytics needed to be displayed on all pages including pages created
in Elementor Page Builder. This plugin helped solve this issue.

 [ קראו את כל 8 הסקירות ](https://wordpress.org/support/plugin/dco-insert-analytics-code/reviews/)

## מפתחים

"DCO Insert Analytics Code" הוא תוסף קוד פתוח. האנשים הבאים תרמו ליצירת התוסף הזה.

תורמים

 *   [ Denis Yanchevskiy ](https://profiles.wordpress.org/denisco/)

“DCO Insert Analytics Code” תורגם ל-2 שפות. תודה רבה ל[מתרגמים](https://translate.wordpress.org/projects/wp-plugins/dco-insert-analytics-code/contributors)
על תרומתם.

[ניתן לתרגם את "DCO Insert Analytics Code" לשפה שלך.](https://translate.wordpress.org/projects/wp-plugins/dco-insert-analytics-code)

### מעוניינים בפיתוח?

[עיינו בקוד](https://plugins.trac.wordpress.org/browser/dco-insert-analytics-code/),
ראו את הקוד ב-[SVN repository](https://plugins.svn.wordpress.org/dco-insert-analytics-code/),
או הירשמו ל[לוג פיתוח](https://plugins.trac.wordpress.org/log/dco-insert-analytics-code/)
באמצעות [RSS](https://plugins.trac.wordpress.org/log/dco-insert-analytics-code/?limit=100&mode=stop_on_copy&format=rss).

## שינויים

#### 1.1.3

 * Add settings link to Plugins page
 * Correct plugin description

#### 1.1.2

 * Constant `DCO_IAC_DO_SHORTCODE` replaced with `dco_iac_disable_do_shortcode` 
   filter. Use `add_filter('dco_iac_disable_do_shortcode', '__return_true');` to
   disable shortcodes support.

#### 1.1.1

 * Added feature to hide the code
 * Added shortcodes support (add constant `define('DCO_IAC_DO_SHORTCODE', false);`
   to wp-config.php for disable)

#### 1.1.0

 * Fixed Text Domain
 * Added the ability to adjust the show code for logged / not logged users
 * Restricted direct access to plugin files

#### 1.0.0

 * גרסה ראשונית

## מטא

 *  גרסה: **1.1.3**
 *  Last updated **לפני 5 שנים**
 *  Active installations **4,000+**
 *  WordPress version ** 4.6 ומעלה **
 *  Tested up to **5.8.13**
 *  PHP version ** 5.3 ומעלה **
 *  Languages
 * [English (US)](https://wordpress.org/plugins/dco-insert-analytics-code/), [Russian](https://ru.wordpress.org/plugins/dco-insert-analytics-code/),
   ו[Swedish](https://sv.wordpress.org/plugins/dco-insert-analytics-code/).
 *  [תרגם לשפה שלך](https://translate.wordpress.org/projects/wp-plugins/dco-insert-analytics-code)
 * Tags
 * [analytics](https://he.wordpress.org/plugins/tags/analytics/)[google analytics](https://he.wordpress.org/plugins/tags/google-analytics/)
   [metrika](https://he.wordpress.org/plugins/tags/metrika/)[yandex metrica](https://he.wordpress.org/plugins/tags/yandex-metrica/)
 *  [תצוגה מתקדמת](https://he.wordpress.org/plugins/dco-insert-analytics-code/advanced/)

## דרוגים

 5 out of 5 stars.

 *  [  8 5-star reviews     ](https://wordpress.org/support/plugin/dco-insert-analytics-code/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/dco-insert-analytics-code/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/dco-insert-analytics-code/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/dco-insert-analytics-code/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/dco-insert-analytics-code/reviews/?filter=1)

[הוסף את הסקירה שלי](https://wordpress.org/support/plugin/dco-insert-analytics-code/reviews/#new-post)

[הצג הכל](https://wordpress.org/support/plugin/dco-insert-analytics-code/reviews/)

## תורמים

 *   [ Denis Yanchevskiy ](https://profiles.wordpress.org/denisco/)

## תמיכה

יש לך משהו לומר? זקוק לעזרה?

 [פורום תמיכה](https://wordpress.org/support/plugin/dco-insert-analytics-code/)