-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PLANET-7625: Move Google Tag Manager scripts away from Twig templates #2503
Open
mardelnet
wants to merge
39
commits into
PLANET-7625_move-scripts-from-twig-templates
Choose a base branch
from
PLANET-7625_move-gtm-scripts-from-twig-templates
base: PLANET-7625_move-scripts-from-twig-templates
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
PLANET-7625: Move Google Tag Manager scripts away from Twig templates #2503
mardelnet
wants to merge
39
commits into
PLANET-7625_move-scripts-from-twig-templates
from
PLANET-7625_move-gtm-scripts-from-twig-templates
Conversation
This file contains 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
- Move gtm script
- Move gtm script
…tps://github.com/greenpeace/planet4-master-theme into PLANET-7625_move-gtm-scripts-from-twig-templates
- Pass data to the script from php templates
- Move gtm script
- Move gtm script
- Pass data to the script from php templates
- Add php docs
…tps://github.com/greenpeace/planet4-master-theme into PLANET-7625_move-gtm-scripts-from-twig-templates
This reverts commit a29a8f6.
mardelnet
changed the title
PLANET-7625: Move Google Tag Manafer scripts away from Twig templates
PLANET-7625: Move Google Tag Manager scripts away from Twig templates
Jan 17, 2025
planet-4
added a commit
to greenpeace/planet4-test-nix
that referenced
this pull request
Jan 17, 2025
/unhold b6809ac3-7eaf-41df-a1bc-e4ada37c334a
- Fix enqueuer
mardelnet
force-pushed
the
PLANET-7625_move-gtm-scripts-from-twig-templates
branch
from
January 17, 2025 11:30
cd17b61
to
b01174e
Compare
planet-4
added a commit
to greenpeace/planet4-test-nix
that referenced
this pull request
Jan 17, 2025
/unhold fecb2cc2-3ac9-49a0-bc88-1b49baeb5c5b
planet-4
added a commit
to greenpeace/planet4-test-nix
that referenced
this pull request
Jan 17, 2025
/unhold 58d37d43-f674-4b03-9df8-c67fd33b7099
mardelnet
force-pushed
the
PLANET-7625_move-gtm-scripts-from-twig-templates
branch
from
January 17, 2025 12:19
6fcf53e
to
9d4b5a4
Compare
planet-4
added a commit
to greenpeace/planet4-test-nix
that referenced
this pull request
Jan 17, 2025
/unhold 00c37e0f-574e-46b6-bff2-2410ad8f0381
- Fix php lint issues
mardelnet
force-pushed
the
PLANET-7625_move-gtm-scripts-from-twig-templates
branch
from
January 17, 2025 14:09
9d4b5a4
to
9a4eab7
Compare
planet-4
added a commit
to greenpeace/planet4-test-nix
that referenced
this pull request
Jan 17, 2025
/unhold f8f6386a-fa3b-43fb-a165-e0224d836c36
Test instance is ready 🚀🌑 nix | admin | blocks report | CircleCI | composer-local.json ⌚ 2025.01.21 15:33:52 |
- Keep functions consistent
planet-4
added a commit
to greenpeace/planet4-test-nix
that referenced
this pull request
Jan 20, 2025
/unhold d82fca69-1e5a-41ee-b5e0-786fa7980b7d
This reverts commit 74d0c46.
planet-4
added a commit
to greenpeace/planet4-test-nix
that referenced
this pull request
Jan 20, 2025
/unhold 74295523-8d4b-4d7f-9080-075d1261d4f7
- Move gtm script
- Pass data to the script from php templates
- Move gtm script
- Pass data to the script from php templates
This reverts commit a29a8f6.
- Fix php lint issues
- Updates the script
…tps://github.com/greenpeace/planet4-master-theme into PLANET-7625_move-gtm-scripts-from-twig-templates
mardelnet
changed the base branch from
PLANET-7625_move-scripts-from-twig-templates
to
demo/wp-block
January 21, 2025 10:48
mardelnet
changed the base branch from
demo/wp-block
to
PLANET-7625_move-scripts-from-twig-templates
January 21, 2025 10:48
planet-4
added a commit
to greenpeace/planet4-test-nix
that referenced
this pull request
Jan 21, 2025
/unhold 2f1b23c2-44c9-4865-ac3e-655d7944b1c7
- Simplify the code
planet-4
added a commit
to greenpeace/planet4-test-nix
that referenced
this pull request
Jan 21, 2025
/unhold 690fb2b7-dfa6-41e6-a355-37c7f36a4f42
- Move gtm script
- Move gtm script
- Pass data to the script from php templates
- Move gtm script
- Pass data to the script from php templates
This reverts commit a29a8f6.
- Fix php lint issues
- Updates the script
- Move gtm script
- Pass data to the script from php templates
This reverts commit a29a8f6.
- Fix php lint issues
- Simplify the code
- Adjustments after rebase
…tps://github.com/greenpeace/planet4-master-theme into PLANET-7625_move-gtm-scripts-from-twig-templates
planet-4
added a commit
to greenpeace/planet4-test-nix
that referenced
this pull request
Jan 21, 2025
/unhold a9656fc9-adb2-44a2-b2fb-0cffd31e5c42
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.
Summary
This PR removes Google Tag Manager scripts from the Twig templates and enqueue them correctly using WordPress methods and Webpack. It's the continuation of #2502
Ref: https://jira.greenpeace.org/browse/PLANET-7625
Testing
Check that Google Tag Manager keeps working as expected.
Notes
pass_gtm_data
every time the functionTimber::render
is called. I've tried to hook that last function to fire the custom action without the need to call it every time thatTimber::render
is also called, but I couldn't. Apparently, there is no such a hook. Please, let me know your thoughts and new ideas.cc: @comzeradd