??????????? ? ????????? ???????? ???????? ????????? ????? yablukom.ua (WordPress) ????? 2

Sorry, this entry is only available in RU.

??????????? ?????? “??????????? ? ????????? ???????? ???????? ????????? ????? yablukom.ua (WordPress)”.

?????????, ??? ???, ??? ?????? ?????? ??????????? ???????… ?

????? ????? ??????? ???????? ???????? ????????\?????? ? ???? ????????, ?????????? ?????? ? ?????…
??? ??? ???????? ????? ??????…

??? ???????? header ?? ???????????

? ??? ??? ?? ?????? ? ????? ????????? ? ??????:

??? ????? ????????? header ????? ???????????

?????????? ??????? ???????? ???????? ????????\?????? ?? ???????? ?????????.

? ???? ????? ? ??????? ????????? ????????????? ?????????? ?????? ?? ?????? ???????? JavaScript-????????? ? CSS ?????? ?? ?????? ? ?????, ? ????? ????????? ???????? ???????? ??????? ???????? Google Tag Manager (GTM), Binotel, Jivosite ?? ????????? ?????? ????? ?????? ???????? – ????? ????? ??????.

?????? «????????? ????? ? ??????? ?????? GTM, Binotel, Jivosite ? ??.»

??? ?????? ????? ????????? ?? ??????? ???????? GTM, Binotel, Jivosite ? ??????. ????? ????, ??? ??? ??????????? ? ??????, ??? ??? ??? ? ???????? ? ??????? ????????, ??? ??? ?????? ?????????? ????????.

??????? GTM GA Binotel Jivosite ? ??????

??? ???????????? ?????????? ???????? ???????? ???? ???? ??????? ???????? (?????????), ??? ??????? ?????????? ? ???? ?????? «????????? ????? ? ??????? ?????? GTM, Binotel, Jivosite ? ??.» (??? ?? ????? ? ?????? ???????? ????????? ? ?????? ??? ?????????? ???? ????? ???????? ? ????????).

????????? ??????? ??????? ???? ??????????? ??? ? ???, ??? ???????? ??????? ?????????? ?? ????????????? ????????? ??????????? ?? ???????? ????? (?.?. ???-?? ???? ??????????? ???????? ???? ????????? ???????????).
????????? ??????? ????????? ? ????????? «????????? GTM» ?????? «?????????» ???????? ???? ???????????????? ?????? WordPress.
?????? ?????? ????????? ?????????? ?????????? ??????????? ???? ??????? ???????? ? ?????? ????? ?????, ? ??? ????? ? ??? ??? ???? ?? ???????????, ??? ?????? ???????? ????.
?? ????????? ????, ????????????? 5 ???? ???????????:
– ????? ????? head;
– ?????? ????? body;
footer, ???? ??? ?? ?????????????????? ?????????????;
footer, ???? ??? ???? ?????????????;
footer, ???? ? ?????????.
????? ??? ????? ? ?????????, ????????????? ????????? ???? ????? ????????. ?? ???????? ?????????? ????????? ???, ????? ???????? ???? ??????? ???????? ?? ???????? ? ???? Pagespeed.

?? ? ????? ????? ?????????\???????? ???? ??????? ???? ????? ??????? ????????.

????????? ??????? ??? ????????????? ?????????

?? ?????? ????????? ???????? ????????? ??? ????????????? ?????????.
????? ????????? ? ?????? ??????????? Pagespeed ????? ????? ?????????:

????????? ????? ????????? ? ?????? ???????????

????????? ???? ??? ??????? ????? ?? ????, ????? ??? ????????????.
??? ????????? ???????? ? ???? ??????, ? ?????? ???? ? ??????? an_gtm_options ? ???????? ??????????? ??????????? ??????? WordPressget_option(‘an_gtm_options’).
? ?????? ?????? ?????? wp-content\themes\yablukom\header.php ? wp-content\themes\yablukom\footer.php ???? ??????????? ????, ?? ??????? ???????? ??????????????? ???????, ???????? ??? ?????? ? ????? ????? head:

function an_place_end_head_echo(){
  global $an_place_output;
  echo $an_place_output['an_place_end_head'];
}

??? ?????? ? ?????????:

function block_with_delay_echo(){
  global $an_place_output;
  global $an_gtm_options;
  echo '<script>';
  echo 'setTimeout(function() {';
  echo $an_place_output['block_with_delay'] . ';';
  echo '}, ' . $an_gtm_options['an_delay_block'] . ');';
  echo '</script>';
}

????? ??????????????? ????????? ??????? ??? ??????? ??????? ??????? ?? ?????? ?? ??????, ?? ? ?? ?????? ? ? ??????????? ?????? ????? ?????? ???????? ???????? + ???????????? ? ?????????? ?????.

??????????? ????????? JavaScript

?? ????????? ?????, ??? ? ?????? ??? ???????????? ?????? ???????…

JavaScript ??? ???????????? ? ??????

????????? ??? ?????????? ??? ?????????????????? ??????? ?? ?? ??????? ? ???? ????? ????????? ? ????? ?? ???????:

$array_to_footer = array(
  'masktelinput',  // wp-content/themes/yablukom/js/inputmask.min.js
  'abwc-ajax-js',  // wp-content/plugins/ajaxified-cart-woocommerce/assets/js/abwc-ajax-cart.min.js
   'abwc-ajax-variation-js'); //wp-content/plugins/ajaxified-cart-woocommerce/assets/js/abwc-ajax-variation-cart.min.js

????????? ? ????? ??????? ???????? ‘group’ = 1 – footer. ??? ????? ??????????? ??????? ?? ???????? ???????????? ? ?????.

// ?????????? ?????? JS-??????? ($array_to_footer)  ? ?????
function an_move_js_to_footer() {
    $array_to_footer = array('masktelinput','abwc-ajax-js', 'abwc-ajax-variation-js');
    foreach( wp_scripts()->registered as $script ) {
        if (in_array($script->handle, $array_to_footer, true)) {
            wp_script_add_data( $script->handle, 'group', 1 ); // 0 - header, 1 - footer
        }
    }
}
add_action( 'wp_enqueue_scripts', 'an_move_js_to_footer', 99 );

????? ???? ???????? ?????????, ??? ? ?????? ???????? ?????? 2 ????? ??????????? :
wp-includes/js/jquery/jquery.js
wp-content/plugins/an-acceleration/js/lazysizes.min.js

?????? JavaScript ????????????? ? ?????

????????? ????????????? ? ?????.

??????????? ??????????? ???????? CSS

?? ????????? ????? ??????????? ???????? ????? ?????? ?????? ? ?????? :

?????? CSS ? header

?????? «??????» ?????? ? ??????:
?????  . . . . . . . . . . . . . . . . . . . . . . . . . .  . . .  ???? ??????

'an-wc-variations-popup-style' // wp-content/plugins/an-wc-variations-popup/css/style.css
'font-awesome-tema' // wp-content/themes/yablukom/css/font-awesome.css
'font-awesome' // wp-content/plugins/load-more-products-for-woocommerce/berocket/assets/css/font-awesome.min.css
'wc-mini-cart-an' // plugins/wc-mini-cart-an/css/wc-mini-cart-an.css
'wp-postratings' // wp-content/plugins/wp-postratings/css/postratings-css.css
'wp-block-library' // wp-includes/css/dist/block-library/style.min.css
'wc-block-style' // wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/style.css
'wpdreams-ajaxsearchlite' // wp-content/plugins/ajax-search-lite/css/style-underline.css

???????? ?? ?????? ? ?????? $array_to_footer
?? ???????? ? JS-????????? ??????? ???????? ???????:

function an_move_css_to_footer() {
    $array_to_footer = array('wc-mini-cart-an','mystyle');
    foreach( wp_styles()->registered as $style ) {
        if (in_array($style->handle, $array_to_footer, true)) {
            wp_style_add_data( $style->handle, 'group', 1 ); // 0 - header, 1 - footer
        }
    }
}
add_action( 'wp_enqueue_scripts', 'an_move_css_to_footer', 99 );

?????????? ????? ????… ?? ??? ? ?? ??????? ? ?? ??????? ??????????? ??????????…
???????, ??????? ? ??????? WordPress… ? ?????????, ??? ??? CSS ??????? ‘group’ ???? ?? ?????????????? …

??????? ???????, ???????… ? ???????? ???? ? ?.
???????? ?????? ?????? ? ?????? $array_to_footer, ?????????? ? ????? ?????????? ??????? $arr_styles ? ??????? ?? ?? ??????????? ??????? ?????? WordPress ???????? wp_deregister_style().

//????????? ????? ?? ??????? $array_to_footer ? ????.?????? $arr_styles ? deregister ?? ?? ???????
function an_move_css_to_global() {
    $array_to_footer = array('an-wc-variations-popup-style','font-awesome-tema','font-awesome','wc-mini-cart-an','wp-postratings','wp-block-library','wc-block-style','wpdreams-ajaxsearchlite');
    global $arr_styles;
	$arr_styles = array();     
    foreach( wp_styles()->registered as $style ) {
        if (in_array($style->handle, $array_to_footer, true)) {
        	$arr_styles[] = array(
        		'handle' => $style->handle,
        		'src'    => $style->src
        	);
        }
    }
    foreach( $arr_styles as $style ) {
    	wp_deregister_style( $style['handle'] );
    }
}
add_action( 'wp_enqueue_scripts', 'an_move_css_to_global', 99 );

?????, ?????????? ??? ????? ?????? ?? ??????, ????? ?????????? ??????????? ??????? $arr_styles ?? ???? ‘wp_footer’ ? ??????? ??????? wp_print_styles().

//????????? ????? ?? ??????? ????.?????? $arr_styles ? ??????? ?? ? ??????
function an_css_global_to_footer() {
	global $arr_styles;
    foreach( $arr_styles as $style ) {
    	wp_register_style( $style['handle'], $style['src'] );
    	wp_print_styles( $style['handle'] );
    }	
}
add_action( 'wp_footer', 'an_css_global_to_footer' );

? ?????????? ?????, ??? ? ?????? ???????? ????????????? ?????? 2 ??????????? ????? ??????.

?????? CSS ???? ? footer

??? ????????? ??????? ? ???? ?????? An_Acceleration for WordPress.
?????? An_Acceleration for WordPress
???? ?????????????? ???? ?????? ? ????????????? ??-??????? ?????????? ? ???? ?????? «????????? ????? ? ??????? ?????? GTM, Binotel, Jivosite ? ??.», ?? ??? ????????? ????? ????????? ? ?????????? Pagespeed Insights ????????? ? ??????? ?????????.

? ?????????? ?????? ?????? ???????? ????????? ??????????:
??? ??? ???????? ????? ???????? ????????? ??:

??? ???????? header ?? ???????????

? ??? ??? ?? ???????? ????? ?????????? ????? ?????:

??? ????? ????????? header ????? ???????????

??? ???????? ??????????? ???????????, ? ????? ???????? ???????????? ????????????????  ??? ???????? ????????? ??? ? ????? ? ?????, ? ????????? ??? ??? ?????????? ?? ???????? ???? https://test-yablukom.eurolighting-technology.com.ua

????????????? ???????? https://test-yablukom.eurolighting-technology.com.ua/semena-podsolnechnika/

?? ? ??? ?????????? Pagespeed Insights:

?? ??????????? Pagespeed

?? ??????????? Pagespeed ???? 1

????? ??????????? Pagespeed

????? ??????????? Pagespeed ???? 1

?? ??????????? ???????????? Pagespeed

?? ??????????? Pagespeed ???? 2

????? ??????????? ???????????? Pagespeed

????? ??????????? Pagespeed ???? 2

?? ??????????? ???????? ?????? Pagespeed

?? ??????????? Pagespeed ???? 3

????? ??????????? ???????? ?????? Pagespeed

????? ??????????? Pagespeed ???? 3

??? ???????? ?????? ??????? ????????? ???????? ???????????:

?????????? ??? ?????????

?? ???????????

????? ???????????

????????? %

Pagespeed (??????? ?? 5 ??????)

9

35

388

????????

112

69

162

?????? ????????

3 415 ??

699 ??

488

????? ???????? ??????? ????????

5,8 ???.

2,5 ???.

232

?????? ???????? ????????

14,7 ???.

12,5 ???.

118

????????? ???????? ????????

7,7 ???.

3,8 ???.

202

????? ???????? ??? ??????????????

26,9 ???.

11,6 ???.

231

????? ????? ??????????

4 050 ??

2 690 ??

150

???????? ??????

9

15

166

???? ????????? ??? ????????, ??? ??????? ????? Pagespeed Insights ( 9 -?? ??????????? ? 35 ?????) – ??? ?????? ???????????  ?????, ??????? ??????? ?? ????????? ? ????????? ??-?? ??????? ???????? ?? ???? (?? ????? ????????? ??????? ????????????)… ? ???????? ??????????? ???????? ??????????? ???????? ?????????? ?????????? ???????? ???????. ? ?????? ?????? ?? ?????? ???????? 6-?? ???????, ?????????? ?? ?? ????? ???????????? ? ???? “???????? ??????”.

?????? ???????? ?????????? ? 3415 ?? ?? 699 ?? (????? ? 5 ???!!!), ?????????? ???????? ? ??????? ? 112 ?? 69 (????? ? 2 ????!!!), ? ??? ????? ????? ??? ???????????? ???????????… ?

???????? ??????? ??? ?? ???????? ???????????? Pagespeed Insights … ?? ???????? ?????, ??? ???? ??????(??????)… ? ???????? ????? ?? ???? ? ????????…

??, ? ?????? ??????? ?? ????? ?
? ????? ????????? ????????? ????????: ??????? ? ???????? ??????…
? ??? ??????? ??????? ???????… ??????? ?????? ????:

??????? ?? ???????????

??????? yablukom ?? ???????????

??????? ????? ???????????

??????? yablukom ????? ???????????

?????? ?????????????? ??????? ???????? ????? ?????? ?? ??????… ??? ?????????? ???? ?????, ?? ???? ???????? ???????? ???????? ? ?????? ? ????? ? ??????? ????????…

???????? ?????? ?????????? ??????? ??????????, ?? ???? ???? ????????? ? 2+ ????… ???? ??? ?????? ? ?? ??????????… ?? ?? ??? ????? ???????? ? ????????? ?????…

 

???????? ?????? ?? ???????????

???????? ?????? ?? ???????????

???????? ?????? ????? ???????????

???????? ?????? ????? ???????????

 

???? ??? ????????, ??? ???????? ?????? ????????? ?? ???????????? ?????? ???????. ?? ???????, ?????????? ???????, ?????????? ?????? ???? ????.

? ??? ? ????? ????????? ?? ?????????:

???????? ?????? ????????? ?? ?????????