Skip to content

Commit f522f43

Browse files
committed
optimize GTM preloading
1 parent 8e6d641 commit f522f43

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

assets/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* PHP Microsite Boilerplate
44
* +++++++++++++++++++++++++
55
*
6-
* Version: 2.0.4
6+
* Version: 2.0.5
77
* Creator: Jens Kuerschner (https://jenskuerschner.de)
88
* Project: https://github.com/jekuer/php-microsite-boilerplate
99
* License: GNU General Public License v3.0 (gpl-3.0)

config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// Current version of the website.
88
// Will be used to control css and js caching.
9-
$version_nr = '2.0.4';
9+
$version_nr = '2.0.5';
1010

1111
// Multilanguage
1212
$language['default'] = 'en'; // Use a key from the array below.

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* PHP Microsite Boilerplate
66
* +++++++++++++++++++++++++
77
*
8-
* Version: 2.0.4
8+
* Version: 2.0.5
99
* Creator: Jens Kuerschner (https://jenskuerschner.de)
1010
* Project: https://github.com/jekuer/php-microsite-boilerplate
1111
* License: GNU General Public License v3.0 (gpl-3.0)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "php-microsite-boilerplate",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"description": "An extremely simple and lightweight PHP framework/boilerplate to spin-up microsites at high speed. Optimized for Performance, Security, SEO, and Directus CMS.",
55
"keywords": [
66
"css",

templates/header.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
<?php include_once './templates/general_meta.php'; ?>
3131

3232
<!-- Preconnect to other servers/domains -->
33-
<link rel="preconnect" href="https:///www.googletagmanager.com" crossorigin>
33+
<?php
34+
if ($the_gtm_id != '') {
35+
echo '<link rel="preconnect" href="https:///www.googletagmanager.com" crossorigin>';
36+
}
37+
?>
3438

3539
<!-- Preload fonts (optional, only .woff2 recommended) -->
3640
<link rel="preload" href="./assets/fonts/open-sans-v17-latin-regular.woff2" as="font" type="font/woff2" crossorigin>

0 commit comments

Comments
 (0)