Skip to content

Commit

Permalink
Set correct loading strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Mar 15, 2024
1 parent 7eae84d commit 4ebb03c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Frontend/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function enqueue_delay_js_script(): void {

$script = esc_attr( $this->datalayer_name ) . '.push({"event" : "load_delayed_js"});' . "\n";

wp_register_script( 'gtmkit-delay', '', [ 'gtmkit-container' ], GTMKIT_VERSION, [ 'strategy' => 'defer' ] );
wp_register_script( 'gtmkit-delay', '', [ 'gtmkit-container' ], GTMKIT_VERSION, [ 'in_footer' => true ] );
wp_enqueue_script( 'gtmkit-delay' );
wp_add_inline_script( 'gtmkit-delay', $script, 'before' );
}
Expand Down

0 comments on commit 4ebb03c

Please sign in to comment.