File: privacy-policy.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!--GENHTML INSERT ^^ ================================================================-->
<!--
12/15: Add a doctype spec on line 1 so IE does fixed footer positioning at bottom.
But use HTML 4 (not 5) spec, so images in tables look as they did with no doctype.
Makes some things render diff (e.g, tables at top, and having hdrs), but no worse.
More details: https://en.wikipedia.org/wiki/Quirks_mode#Comparison_of_document_types.
-->
<!--END INSERT========================================================================-->


<HTML>

<HEAD>

<TITLE>Privacy Statement: learning-python.com</TITLE>

<!--GENHTML INSERT====================================================================-->

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<!--
For this file only: UTF-8 Unicode encoding, for non-ASCII or non-English characters.
If omitted, browsers may guess, but often fall back on US-ASCII or user settings.
Update Dec-2018: move the <meta> encoding declaration above this comment, and 
the _META_ genhtml tag to the top of <head> if needed, so <meta> is in the first 
1024 bytes of the file per HTML5 standard.  Nonconforming pages work fine in all 
20+ browsers tested, though Firefox issues a warning in its web console, and some
may restart the page parse - a minor performance penalty.  Not an issue in thumbspage 
output, app user guides, showcode pages, or unzipped programs' Apache index pages. 
-->
<!--END INSERT========================================================================-->


<!--GENHTML INSERT====================================================================-->
<!--
Recoded Aug-18 to use relative path, after broken by https:// conversion: can't mix 
http:// page resources (see .htaccess note).  This required regenerating and uploading 
all .html files, but not hundreds of manual page edits - genhtml works!  Formerly 
used ICON-DEFAULT, which has now-dated docs on icon links and filetypes in general.
An icon file in the root folder suffices on some (but not all) web servers.
-->

<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />

<!--END INSERT========================================================================-->


<!--GENHTML INSERT====================================================================-->
<!--this insert serves *TWO* purposes: stylesheet and mobile viewport-->

<!--
Nov-15: CSS file, code in <HEAD>, for fonts, borders, navbars, code, etc.
This could also use an in-page <STYLE> sheet, as genhtml pastes any text.
-->

<link rel="stylesheet" type="text/css" href="_main.css">

<!--
Feb-18: Add a mobile-friendly viewport tag to every page's HEAD.
Fits content to device width, no zoom (user may), impacts MANY formats.
Extend STYLE instead of adding a new insert to avoid all-page updates.
Mobile support required other redesign: toolbar, code blocks, images,... 
-->
 
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--END INSERT========================================================================-->


<!--GENHTML INSERT====================================================================-->
<!--
7/6/14: Google Analytics JavaScript (JS) code in <HEAD> (normally) - in two flavors.
Used only to prioritize high-traffic pages for dev work, iff JS and tracker enabled. 

The former/defunct training site's id: ga('create', 'UA-52578333-1', 'auto').
The book site's id, now used for all:  ga('create', 'UA-52579036-1', 'auto').
JS is also used if enabled for thumbspage galleries, Top buttons, TOCs, etc.

Jun-2019: tell Google Analytics to anonymize IP address on receipt for privacy.
More: https://developers.google.com/analytics/devguides/collection/analyticsjs/.

Oct-2022: install a GA4 tag (i.e., script) alongside the prior UA tag.  UA tags
will stop collecting data in 2023.  It's okay to use both until the cutover (and
Google advises doing so), but the UA tag will be pointless after that and should
be removed.  This handles genhtml-insert clients; others get tags by running
insert-analytics.py in package-publishing scripts.  Also per Google: "In Google 
Analytics 4, IP anonymization is not necessary since IP addresses are not logged
or stored".  Let's hope so... -->


<!-- 1) Universal Analytics tag (custom): stops collecting data on Jul-1-2023 -->

<SCRIPT>
  // Start async JS-file fetch, if not already cached

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  // Queue actions to run in order after async JS-file fetch finished

  ga('create', 'UA-52579036-1', 'auto');       // Create tracker object (and queue)
  ga('set', 'anonymizeIp', true);              // Anonymize IP addr (&aip) [Jun-2019]
  ga('send', 'pageview');                      // Send page-view event now 
</SCRIPT>


<!-- 2) Google Analytics 4 tag: added to site Oct-2022 (okay to keep UA tag) -->

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J8CTEZHX3L"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-J8CTEZHX3L');
</script>

<!--END INSERT========================================================================-->


<STYLE>
DT {
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 10px;
}    
</STYLE>

</HEAD>



<H1>The Privacy Policy at learning-python.com</H1>

<P><I>Last updated: June 2019</I>

<P>
This website's mission is to support programmers and book readers. 
It does not sell products online, insert advertising on any of  
its pages, or directly interface with advertising APIs of any kind.  
To help focus limited content-creation resources on popular pages
and topics, this website does collect two types of visitor 
information:

<DL>
<DT>Automatic site-traffic statistics
<DD>
This site records visitor traffic to identify popular pages.

<DT>Explicitly input site-search terms
<DD>
This site records user searches to pinpoint popular topics.
</DL>

<P>
In both cases, this information is completely anonymous, and is 
not associated with an individual user.  It is used only to allocate 
development time to pages that merit attention, and is never sold to
or otherwise shared with any third party (apart from a mid-2018 
traffic summary posted
<A HREF="site-traffic-half1-2018.txt">here</A>).
The following sections go into more detail on the two types of 
information collected.



<H2>Site-Traffic Statistics</H2>

<P>
This site uses the popular
<A HREF="https://en.wikipedia.org/wiki/Google_Analytics">Google Analytics</A> 
system to automatically collect statistics on page visits.  
Under this system, JavaScript code in web pages sends page-view data
to Google servers, which is stored on Google databases for later
reporting to site owners.  
To help protect your privacy, this site 
also explicitly <I>anonymizes IP addresses</I> post transmission with 
Google Analytics API tools described  
<A HREF="https://support.google.com/analytics/answer/2763052">here</A>.
You can learn more about the API
<A HREF="https://developers.google.com/analytics/devguides/collection/analyticsjs/">here</A> and  
<A HREF="https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#anonymizeIp">here</A>,
and see how it's used in the raw code of this site's pages 
<A HREF="cgi/showcode.py?name=privacy-policy.html">here</A> and
<A HREF="cgi/showcode.py?name=mergeall-android-scripts/_README.html">here</A>.

<!-- plus .htaccess auto-index replies, but this doesn't seem to work as an href (tbd)
<A HREF="view-source:https://www.learning-python.com/android-tkinter/CODE/">here</A>
-->

<P>
In short, this means that the lower digits of your IP address 
shipped in network headers are discarded immediately on receipt
by Google's servers, and never used in processing or stored in
Google's databases.  This anonymization step may reduce the accuracy 
of geolocation information, but is crucial for privacy: without it, 
your page visits could be tied to you directly, and might be 
covertly used for advertising and other 
<A HREF="https://en.wikipedia.org/wiki/Google_Analytics#Privacy">profiling</A>.

<P>
Of course, this scheme relies on Google to be true to its word on 
IP-address handling (and truth is not always a moral imperative for 
billion-dollar 
<A HREF="https://www.theguardian.com/technology/2019/jul/26/apple-contractors-regularly-hear-confidential-details-on-siri-recordings">companies</A>).
If Google Analytics ever proves to be 
a profiling Trojan horse, this site will switch to an open-source 
alternative such as <A HREF="https://matomo.org/">Matomo</A>.
Such systems reduce analytics privacy perils 
by cutting out third-party data collection and storage and
are broadly recommended, but this site's development and 
performance budgets preclude a preemptive switch.

<P>
For the present, if you are uncomfortable with this site's analytics
story, you're encouraged to use your browser's <I>tracker blocker</I> or disable 
<I>JavaScript</I> while visiting here to avoid this data collection entirely.  
This site works normally in both these modes (except for JavaScript-based 
image <A HREF="trnpix/index.html">viewers</A>), 
but your page-preference votes won't be counted.
Subject to implementation choices of browsers and Google, 
you may also be able to opt out of analytics by disabling <I>images</I>
(which are a major part of content here),
and neuter it by disabling <I>cookies</I>
(which are otherwise unused here).


<P>
This site also hosts a <A HREF="ip-anon.py">script</A> 
that may help with adding anonymization to other sites, 
and strongly recommends 
<A HREF="https://en.wikipedia.org/wiki/Ad_blocking">ad blockers</A>
for using the web in general;
even though IP addresses are obscured here, they probably won't be 
elsewhere.
</P>



<H2>Site-Search Terms</H2>

<P>
This site uses a custom search system that inputs and
saves a textual <I>search term</I> you explicitly provide, and passes 
the term on for processing to a search engine you explicitly choose.  
This system is fully open source: you can view the 
<A HREF="sitesearch.html">search page</A>, the page's raw
<A HREF="cgi/showcode.py?name=sitesearch.html">HTML</A>, and the 
<A HREF="cgi/showcode.py?name=cgi%2Fsitesearch.py">script</A>
that processes your request on this site's server.
This site's use of 
<A HREF="https://en.wikipedia.org/wiki/HTTPS">HTTPS</A> 
also protects the privacy of your input during transmission.

<P>
The search term you provide, along with the date and time of the 
search, is stored in a <I>simple file</I> at this website.  This file
records only the search term and date/time; records no information 
about you; is accessible only to this website's owner; is not 
accessible on the 
<A HREF="cgi/">web</A>&nbsp;
<A HREF="cgi/sitesearch-savedterms.txt">at</A>&nbsp;
<A HREF="cgi/showcode.py?name=cgi/sitesearch-savedterms.txt">large</A>; 
and is never shared with any other parties.

<P>
As described in the search page, your search term is also passed on 
to a selected <I>search provider</I> by an HTTP redirect, and this site has 
no control over the term after the redirect occurs.  Although no extra
or personal information is sent to the search engine, running a 
search on this site has the same privacy characteristics as manually 
submitting your search term on your chosen search provider's site.  
Please search with care.
</P> 



<!--GENHTML INSERT====================================================================-->
<!--
Nov15: added via genhtml.py, to avoid pasting footer in every file on changes.
See learning-python.com/genhtml.html for other options and their tradeoffs.
-->

</P>

<!--Feb18: make table responsive, for mobile-friendly scrollbar on small screens -->
<BR><BR>
<DIV class=footerdiv>
<TABLE class=footertable bgcolor=tan>

<!-- NESTED INSERT: can't nest > 2 deep -->      

<!-- gif now is Home, not python.org  -->
<!-- scale larger gif for better res  -->
<!-- border=0 only for IE img links   -->
<!-- _main.css center aligns all <td> -->
<!-- now narrower to avoid scrollbars -->

<TR>

<TD>
  <A class=blocklinkbar href="index.html">
  <IMG SRC="PythonPowered.gif" border=0 width=55 height=22
       ALT="[Home page]" TITLE="Home page"></A>  
<TD>
  <A class=blocklinkbar HREF="index-book-links.html">Books</A>
<TD>
  <A class=blocklinkbar HREF="programs.html">Code</A>
<TD>
  <A class=blocklinkbar HREF="posts.html">Blog</A>
<TD>
  <A class=blocklinkbar HREF="about-python.html">Python</A>
<TD>
  <A class=blocklinkbar HREF="formalbio.html">Author</A>
<TD>
  <A class=blocklinkbar HREF="training.html">Train</A>
<TD>
  <A class=blocklinkbar HREF="sitesearch.html">Find</A>
<TD>
  <A class=blocklinkbar HREF="mailto:lutz@learning-python.com">&copy;M.Lutz</A>

<!--DEFUNCT
<TD>
  <A class=blocklinkbar HREF="mailto:lutz@learning-python.com">Email</A>
<TD>
  <A class=blocklinkbar HREF="#">Top</A>
DEFUNCT-->

</TR>

<!-- END NESTED INSERT -->

</TABLE>
</DIV>

<!--END INSERT========================================================================-->


</BODY>
</HTML>



[Home page] Books Code Blog Python Author Train Find ©M.Lutz