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
Allow google analytics to work on Spaces (and other iframe situations) #6427
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-builds.s3.amazonaws.com/b9475abad72f8051f93ed94636fd25e4bc49a245/gradio-4.3.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@b9475abad72f8051f93ed94636fd25e4bc49a245#subdirectory=client/python" |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
Yes we should be able to use the deployed space to check |
actually @abidlabs i think something more complicated is happening. I think spaces is removing the gtag code inside the iframe... it doesn't show up even on the iframed domain: https://gradio-pr-deploys-pr-6427-all-demos.hf.space/ try looking for it in inspect element whereas shows up fine locally, on colab etc |
nvm like you pointed out it's cause we disable analytics on pr spaces. ignore what i said |
Thanks @aliabd for debugging this with me! |
Following https://stackoverflow.com/questions/74494818/google-analytics-not-working-for-web-site-embeded-in-iframe (thanks for sharing @aliabd), modified our google analytics tag to work on Spaces.
Not sure if there's an easy way to test that this is working, but will take a look at our GA to see if anything shows up due to the deployed Space PR.