Skip to content
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

activate gtm using presets #165

Merged
merged 1 commit into from
Dec 13, 2024
Merged

activate gtm using presets #165

merged 1 commit into from
Dec 13, 2024

Conversation

adamtwo
Copy link
Collaborator

@adamtwo adamtwo commented Dec 11, 2024

Description

This PR removes the custom script tags that attempted to install GTM and uses the presets mechanism instead. The original solution didn't work as it didn't inject the mandatory markup in the body section:

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PPXTTZ2"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

What's included?

  • GTM added using presets

General Tests for Every PR

Please make sure your PR adheres to the following requirements:

  • npm run start still works.
  • npm run build still works.
  • Code adheres to project style guidelines (e.g., linting, formatting).
  • Any new dependencies have been added to the appropriate files.
  • The changes do not introduce new issues or regressions.

Screenshots or Visual Updates (if applicable)

N/A

Copy link

github-actions bot commented Dec 12, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-12-13 16:30 UTC

@adamtwo
Copy link
Collaborator Author

adamtwo commented Dec 12, 2024

I've checked the preview, and it has the right markup. Please note, by Docusaurus doesn't render GTM when you do npm run start . They don't want to publish metrics from test instances. The GTM markup is included only when you build with npm run build.

@adamtwo adamtwo requested a review from Daniel-Itzul December 12, 2024 00:25
@owilliams320 owilliams320 merged commit 76969c2 into main Dec 13, 2024
1 check passed
@owilliams320 owilliams320 deleted the activate-gtm-using-plugin branch December 13, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants