diff --git a/_config.yml b/_config.yml
index ac53ff1..4857c01 100644
--- a/_config.yml
+++ b/_config.yml
@@ -30,7 +30,7 @@ google_fonts:
weights: "400,400i,700,700i"
- name: "Lora"
weights: "400,400i,700,700i"
-google_analytics: UA-64050901-1
+google_analytics: G-R1L5NXLCYC
disqus:
shortname: leewc
twitter:
diff --git a/_includes/google-analytics-custom.html b/_includes/google-analytics-custom.html
new file mode 100644
index 0000000..7f1f59a
--- /dev/null
+++ b/_includes/google-analytics-custom.html
@@ -0,0 +1,24 @@
+{% comment %}
+ Old style Google analytics uses codes of the form UA-XXXXXXXX. The new Google Analytics 4 uses codes of the form G-XXXXXXX. Each has different javascript.
+{% endcomment %}
+
+{%- if site.google_analytics contains 'UA-' -%}
+
+{%- else %}
+
+
+{% endif %}
\ No newline at end of file
diff --git a/_includes/scripts.html b/_includes/scripts.html
new file mode 100644
index 0000000..cc459d3
--- /dev/null
+++ b/_includes/scripts.html
@@ -0,0 +1,54 @@
+{%- if site.footer_scripts -%}
+ {%- for script in site.footer_scripts -%}
+ {%- if script contains "://" -%}
+ {%- capture script_path %}{{ script }}{% endcapture -%}
+ {%- else -%}
+ {%- capture script_path %}{{ script | absolute_url }}{% endcapture -%}
+ {%- endif -%}
+
+ {%- endfor -%}
+{%- else -%}
+
+
+
+{%- endif -%}
+
+{%- if jekyll.environment == 'production' and site.google_analytics -%}
+
+ {% include google-analytics-custom.html %}
+{%- endif %}
+
+{% if site.mathjax == true or site.mathjax.enable == true %}
+
+{% capture mathjaxjs %}https://cdn.jsdelivr.net/npm/mathjax@3/es5/{{ site.mathjax.combo | default: "tex-svg" }}.js{% endcapture %}
+
+
+
+{% endif %}
+
+{%- if page.layout == "search" -%}
+ {% include lunr-search-scripts.html %}
+{%- endif -%}
\ No newline at end of file