Skip to content

Move Google Tag Manager code to analytics_enabled block in Blocks.svelte#3956

Merged
abidlabs merged 2 commits into
gradio-app:mainfrom
akx:remove-google-tag-manager
Apr 24, 2023
Merged

Move Google Tag Manager code to analytics_enabled block in Blocks.svelte#3956
abidlabs merged 2 commits into
gradio-app:mainfrom
akx:remove-google-tag-manager

Conversation

@akx

@akx akx commented Apr 24, 2023

Copy link
Copy Markdown
Contributor

It's not really well documented that using Gradio may make your application communicate with Google Tag Manager, which allows whoever owns the property UA-156449732-1 (hopefully someone benign) to execute basically any code; that should probably be made clearer.

Description

  • relevant motivation: I don't think Google Analytics code (even if it does nothing unless GTM is enabled) should exist in the base HTML template when analytics are not enabled.
  • a summary of the change: move the initialization code to the Svelte template.

Checklist:

  • I have performed a self-review of my own code
  • I have added a short summary of my change to the CHANGELOG.md
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@gradio-pr-bot

Copy link
Copy Markdown
Collaborator

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-3956-all-demos

@akx akx force-pushed the remove-google-tag-manager branch from 1b9fdb4 to 2d654bc Compare April 24, 2023 19:35
@abidlabs

Copy link
Copy Markdown
Member

Thanks for the PR @akx! Seems reasonable to me. Taking a look now

@abidlabs

Copy link
Copy Markdown
Member

LGTM @akx! Thanks again. I just ran scripts/format_frontend.sh so that the static checks for the frontend pass. Will merge once the CI is green

@abidlabs abidlabs merged commit 1598680 into gradio-app:main Apr 24, 2023
@akx akx deleted the remove-google-tag-manager branch April 24, 2023 20:43
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.

3 participants