简体   繁体   English

如何在没有JavaScript跟踪的情况下获取QR码?

[英]How can I get a QR code without JavaScript tracking?

I am helping design a small web site for a local nonprofit group and wanted to include a QR code for easy access. 我正在帮助为当地的一家非营利组织设计一个小型网站,并希望包含一个QR码以便于访问。 I have generated a few such codes from "free" web-based services, and then examined the codes. 我从“免费”基于Web的服务生成了一些这样的代码,然后检查了代码。 All the generated codes do contain the web site, but I also noticed that all of the QR codes have JavaScript calls to PageTracker quietly appended to the end of the code block. 所有生成的代码都包含网站,但我也注意到所有的QR代码都对页面跟踪器的JavaScript调用安静地附加到代码块的末尾。 In all the articles I have read about QR codes, nobody has discussed these largely invisible additions. 在我读过的关于QR码的所有文章中,没有人讨论过这些基本上看不见的新增内容。

Given that I was not asked if I wanted these functions appended, I assume that the use of these QR codes is tracked by Google Analytics for the various sites that provide the QR code generation service (I have included an example of the JavaScript at the bottom of this question.) 鉴于我没有被问到是否需要附加这些功能,我认为Google Analytics会为提供QR代码生成服务的各种网站跟踪这些QR代码的使用(我在底部包含了一个JavaScript示例)这个问题。)

I am not thrilled about my website user's (and their mobile phones) being tracked by a third party without either my or their permission. 在没有我或他们的许可的情况下,我的网站用户(以及他们的手机)被第三方跟踪我并不感到激动。 So given that, my question is two-fold: 1) Is there an easy way to get a QR code without the stealthy tracking (ie it just opens my web site)? 所以考虑到这一点,我的问题是双重的:1)有没有一种简单的方法来获得没有隐身跟踪的QR码(即它只是打开我的网站)? --and if not-- 2) Is there any way that I can benefit from the Google Analytics data generated? - 如果没有 - 2)我有什么方法可以从生成的Google Analytics数据中受益?

Thank you! 谢谢!

`<script type="text/javascript">`
`var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");`
`document.write(decodeURIComponent("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));`
`</script>`

`<script type="text/javascript">`
`var pageTracker = _gat._getTracker("UA-788492-5");`
`pageTracker._initData();`
`pageTracker._trackPageview();`
`</script>`

I don't think the ZXing QR code generator does any funny business. 我不认为ZXing二维码生成器做任何有趣的事情。 It's open source so you can inspect the generator source code to check it. 它是开源的,因此您可以检查生成器源代码以进行检查。

I've used Google Charts for this in a few projects and while I can't say what kind of logging they do on their side it certainly doesn't add anything on your side. 我在一些项目中使用了谷歌图表,虽然我不能说他们在他们身边做了什么样的记录,但它肯定不会添加任何东西。

Just insert this as an image on your site: https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=Hello%20stackoverflow&choe=UTF-8 只需将其作为图片插入您的网站: https//chart.googleapis.com/chart?chs = 250x250&tet = qr&chl = Hello20stackoverflow&choe = UTF-8

上面的网址示例图片

You can find more info about it here: https://developers.google.com/chart/infographics/docs/qr_codes 您可以在此处找到有关它的更多信息: https//developers.google.com/chart/infographics/docs/qr_codes

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM