diff --git a/functions.php b/functions.php
index 9bbb56c..f5e42b7 100755
--- a/functions.php
+++ b/functions.php
@@ -77,6 +77,90 @@ function barebones_enqueue_scripts() {
add_action( 'wp_enqueue_scripts', 'barebones_enqueue_scripts' );
+/**
+ * Add async and defer attributes to enqueued scripts
+ *
+ * @param string $tag
+ * @param string $handle
+ * @param string $src
+ * @return void
+ */
+
+function defer_scripts( $tag, $handle, $src ) {
+
+ // The handles of the enqueued scripts we want to defer
+ $defer_scripts = [
+ 'SCRIPT_ID'
+ ];
+
+ // Find scripts in array and defer
+ if ( in_array( $handle, $defer_scripts ) ) {
+ return '' . "\n";
+ }
+
+ return $tag;
+}
+
+add_filter( 'script_loader_tag', 'defer_scripts', 10, 3 );
+
+
+/**
+ * Add custom scripts to head
+ *
+ * @return string
+ */
+
+function add_gtag_to_head() {
+
+ // Check is staging environment
+ if ( strpos( get_bloginfo( 'url' ), '.test' ) !== false ) return;
+
+ // Google Analytics
+ $tracking_code = 'UA-*********-1';
+
+ ?>
+
+
+
+