Increase GTM head tag priority to ensure it loads before all CSS and JS - #139
Draft
gabiudrescu wants to merge 1 commit into
Draft
Conversation
Changed the priority of the GTM tag in the head section from 100 to 10000. This ensures the Google Tag Manager container code is placed at the very beginning of the <head> tag, before any CSS or JavaScript files, following Google's best practice recommendations for GTM implementation. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
gabiudrescu
marked this pull request as draft
October 20, 2025 21:59
Owner
|
I don't think this will place it before the CSS - have you tested it? {% block stylesheets %}
{{ sylius_template_event('sylius.shop.layout.stylesheets') }}
{% endblock %}
{{ sylius_template_event('sylius.shop.layout.head') }}I think we include this code at the second event in that snippet. In the base Sylius shop layout (in 1.14 at least) there don't seem to be events available higher up within the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed the priority of the GTM tag in the head section from 100 to 10000. This ensures the Google Tag Manager container code is placed at the very beginning of the tag, before any CSS or JavaScript files, following Google's best practice recommendations for GTM implementation.
Generated with Claude Code
Attempt to fix #138