Skip to content

Commit 2f9cbf1

Browse files
authored
feat standardize script order (#974)
1 parent 32687e8 commit 2f9cbf1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/_includes/layouts/default.njk

+4-3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
{% endset %}
5252
<script>{{ js | jsMin | safe }}</script>
5353

54+
{% if canonicalUrl | shouldCanonicalHaveGAM %}
55+
<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js" crossorigin="anonymous" async></script>
56+
{% endif %}
57+
5458
{# Dynamically load Adsense scripts #}
5559
{% block monetization %}
5660
{% endblock %}
@@ -119,9 +123,6 @@
119123

120124
{{ site.codeinjection_head | safe if site.codeinjection_head }}
121125
{{ codeinjection_head | safe if codeinjection_head }}
122-
{% if canonicalUrl | shouldCanonicalHaveGAM %}
123-
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
124-
{% endif %}
125126

126127
{% block datasourceInfo %}
127128
{% endblock %}

0 commit comments

Comments
 (0)