DCO Insert Analytics Code
Allows you to insert analytics code before or after or before
Consider an alternative
DCO Insert Analytics Code shows warning signs in 2026 — compare the alternatives below before installing. It runs on 4K+ sites, is rated 5/5 and was last updated 5 years ago, and scores 41/100 on our health check.
- Momentum — downloads up 53.5% vs the previous 30 days
- No update in 5 years
- Only tested up to WordPress 5.8 (latest is 7.1)
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where DCO Insert Analytics Code stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| analytics | >100 |
| google analytics | >100 |
| metrika | #28 |
| yandex metrica | #37 |
Version adoption
Share of active sites per release.
Rating breakdown
★★★★★★★★★★ 5 from 8 reviews
About DCO Insert Analytics Code
From the official readme · v1.1.3Description
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>
Usage
After installation and activation, you can insert the necessary code to the respective fields on the plugin settings page.
GitHub
Settings
- 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');
Installation
- Upload
dco-insert-analytics-codefolder to the/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
Changelog
1.1.3
- Add settings link to Plugins page
- Correct plugin description
1.1.2
- Constant
DCO_IAC_DO_SHORTCODEreplaced withdco_iac_disable_do_shortcodefilter. Useadd_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
- Initial Release
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.
Best DCO Insert Analytics Code alternatives
All analytics plugins →FAQ
DCO Insert Analytics Code: quick answers
Straight answers, pulled from live WordPress.org data.
Source: WordPress.org
Is DCO Insert Analytics Code free?
Yes. DCO Insert Analytics Code is free to download and use from the official WordPress.org plugin directory.
Is DCO Insert Analytics Code safe to use in 2026?
DCO Insert Analytics Code shows warning signs in 2026 — compare the alternatives below before installing. It runs on 4K+ sites, is rated 5/5 and was last updated 5 years ago, and scores 41/100 on our health check.
How many websites use DCO Insert Analytics Code?
DCO Insert Analytics Code is active on 4K+ WordPress websites and has been downloaded 40,477 times since it launched in January 2016. It was downloaded 531 times in the last 30 days.
Does DCO Insert Analytics Code work with WordPress 7.1?
DCO Insert Analytics Code is officially tested up to WordPress 5.8.20, while the latest release is 7.1.5. It may still work, but try it on a staging site first.
What PHP version does DCO Insert Analytics Code need?
DCO Insert Analytics Code requires PHP 5.3 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was DCO Insert Analytics Code last updated?
The latest version, 1.1.3, was released on July 28, 2021 (5 years ago).
Who makes DCO Insert Analytics Code?
DCO Insert Analytics Code is developed and maintained by Denis Yanchevskiy.
What are the best alternatives to DCO Insert Analytics Code?
The most popular alternatives to DCO Insert Analytics Code are Site Kit by Google (5M+ installs), MonsterInsights (2M+ installs) and WP Statistics (500K+ installs).
Powered by PageForge
One template and a spreadsheet. A real page for every search.
PageForge turns each row of a CSV into a WordPress page with its own title, URL, SEO fields and schema, built on the layout you already designed. Free on WordPress.org.
- CSV and XLSX, plus Google Sheets on Professional and Enterprise
- Its own title, URL, SEO fields and schema for every page
- Works with the block editor, Elementor, Divi and Avada
- Free on WordPress.org, no credit card


