Internet-Draft | analytics.txt | June 2021 |
Ring & Niefeld | Expires 20 December 2021 | [Page] |
Internet privacy has become an important feature for users of websites and services. This document proposes a way for websites and services to declare and disclose their usage of analytics and tracking software. analytics.txt aims to be an elaborate file format that describes the privacy related characteristics of analytics and tracking software in a non-biased way. An analytics.txt file is understandable for a non-technical audience, while also useful for the automated consumption by tools and software.¶
This note is to be removed before publishing as an RFC.¶
Source for this draft and an issue tracker can be found at https://github.com/offen/analyticstxt.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 20 December 2021.¶
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
User tracking and the utilization of analytics software on websites has become a widely employed routine, visibly and invisibly affecting the way the user facing internet works and behaves. Yet, there is no well-defined way of accessing information about what software is being used and what kind of data it is collecting in a standardized way. Legislation can only ever cover a subset of the range of existing technological implementations, creating incentives for software to find workarounds, thus allowing them to hide their presence from users. Automated audits are limited to aspects that are possible to detect in clients, but cannot disclose other important implementation details.¶
This document defines a way to specify the privacy related characteristics of analytics and tracking software. We aim for this information to be consumable both by humans as well as software. For example, search engines or browser extensions could make use of the provided data and display information to users, but it should also be simple enough to serve as information for inquiring users as is.¶
The file "analytics.txt" is not intended to replace the requirement for complying with existing regulations, but supposed to give insights beyond the scope of these regulations.¶
Analytics as referred to in this document involves the collection of usage statistics in order to generate reports that can help the providers of websites and services to better understand and optimize their services towards real world user behavior. This can also include measuring different content against different groups of users. Analytics or user tracking as referred to in this document does not refer to the identification of users in order to deliver customized advertising or content across websites of any kind.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The term "implementors" refers to the providers of services and websites that wish to use an analytics.txt file.¶
This document defines a text file format that can be used by implementors to signal information about their usage of analytics software to both users and software.¶
By convention, this file is called "analytics.txt". Its location and scope are described in Section 4.¶
This text file contains multiple fields with different values. A field contains a "name" which is the first part of a field all the way up to the colon (for example: "Author:") and follows the syntax defined for "field-name" in section 3.6.8 of [RFC5322]. Field names are case-insensitive (as per section 2.3 of [RFC5234]). The "value" comes after the field name and follows the syntax defined for "unstructured" in section 3.2.5 of [RFC5322]. The file MAY also contain blank lines and comments.¶
A field MUST always consist of a name and a value (for example: "Author: Jane Doe jane.doe@example.com"). Each field MUST appear on its own line. Unless specified otherwise by the field definition, multiple values MUST be chained together for a single field (for example: "Implements: gdpr, ccpa") using the "," character (%x2c). A field MAY NOT appear multiple times.¶
Implementors SHOULD aim for authoring an analytics.txt file that is easy to understand by non-technical audiences.¶
Every line MUST end either with a carriage return and line feed characters (CRLF / %x0D %x0A) or just a line feed character (LF / %x0A).¶
Like many other formats and protocols, this format may need to be extended over time to fit the ever-changing landscape of the Internet. Special attention is required for defining the allowed values in enumerations to ensure they are a. extendable and b. do not become obsolete too quickly.¶
Field names are case-insensitive, yet implementors SHOULD use the capitalized style used in this document for consistency.¶
Field values are case-insensitive. Unless otherwise specified, implementors MUST refer to the allowed values for a field given by the specification.¶
This REQUIRED multi-value field indicates which potentially privacy relevant user specific data is being collected or used in session identification or other procedures. These values MUST also be specified if a property is not persisted as-is, but stored or processed in a hashed and/or combined form.¶
No analytics data is collected at all. This value MUST NOT be used in conjunction with other values.¶
The URL of a visit, including its path, is collected and used. This MUST also be specified in case URLs are stripped of certain parameters or pseudonymized before being stored.¶
The request IP address is being used.¶
Geographic location of users is determined and used. This could for example be derived from the request IP, or from using browser APIs.¶
Information about the utilized User Agent is being collected.¶
Browser Fingerprinting is used. Such mechanisms usually try to compute a unique identifier from properties of the host Operating System, allowing them to re-identify users without having to persist an identifier.¶
The user's device type (e.g. mobile / tablet / desktop) is being determined and collected.¶
The Referrer of a visit is collected and used. This MUST also be specified if the referrer value is stripped of potential path fragments.¶
The duration of a visit, either on page- or on session-level is measured and used.¶
Custom events like conversion goals are defined and used. This MAY be left out in case the analytics software in use offers such functionality, but implementors chose not to use the feature.¶
Detailed behavior like mouse movement and scrolling is recorded and can possibly be played back when analyzing the analytics data.¶
This field is REQUIRED unless the only value of the Collects field as per Section 3.4.2 is none. The multi-value field indicates whether data is persisted on the client during the collection of analytics data and declares the browser features used for doing so. In case no data is being persisted at all, the value none MUST be used as the single entry for this field.¶
No data is persisted on the client during the collection of usage data. This value MUST NOT be used in conjunction with other values.¶
Data is persisted on the client using non-cookie JavaScript APIs like localStorage
, sessionStorage
, WebSQL
or IndexedDB
¶
The analytics software leverages browser caches to store identifiers. For example, ETag headers can be used to identify users based on their browser caches' contents. This value is not required in case the analytics software sends static resources with cache headers, but does not make use of the request headers on subsequent requests.¶
This field is REQUIRED unless the only value of the Collects field Section 3.4.2 is none. The multi-value field indicates the technical implementation details for how analytics data is being collected.¶
A client-side script is used to collect data.¶
A static resource - typically a pixel - transferred via HTTP is being used to collect data through the request parameters.¶
Collection of usage data is happening on the server side at application layer.¶
Usage data is being calculated from server log files.¶
Other techniques that are not described in this section are in use.¶
This field is REQUIRED unless the only value of the Collects field Section 3.4.2 is none. The multi-value field discloses information about whether user consent is being acquired before collecting analytics data, and if it is possible for users to opt out of the collection of usage data.¶
The software does not define a way for users to opt in or opt out of the collection of usage data. This value also applies to scenarios where only a subset of data is collected by default and could be extended by opting in. This value MUST NOT be used in conjunction with other values.¶
No usage data is collected before users have given their consent.¶
Users can opt out of collection of usage data using a dedicated feature tailored towards the user audience. This value is only applicable in case no data at all is collected after having opted out.¶
This field is REQUIRED unless the only value of the Collects field Section 3.4.2 is none. The single-value field indicates the duration for which the analytics data is being stored before being deleted. This duration MUST also cover periods where data might transition to be stored in aggregated form only. The value is either a duration as defined in [RFC3339] or the token "perpetual" in case data is retained without expiring it at some point. Implementors SHOULD add a comment providing a human readable value to this field.¶
This OPTIONAL, RECOMMENDED multi-value field indicates which browser level privacy controls are being honored when collecting data.¶
Data is collected even if any of the browser settings listed below are in use. This value MUST NOT be used in conjunction with other values.¶
User-Agents that have DoNotTrack [DNT] enabled will be excluded from the collection of analytics data.¶
User agents that have Global Privacy Control [GPC] enabled will be excluded from the collection of analytics data.¶
This OPTIONAL, RECOMMENDED multi-value field indicates the coverage in session and user lifecycle tracking.¶
Each event that is collected is anonymous. There is no way to connect and group multiple pageviews by user or similar. This value MUST NOT be used in conjunction with other values.¶
Metrics that source from a single browser session can be grouped and distinguished as such.¶
Users can be identified across multiple browser sessions.¶
This OPTIONAL, RECOMMENDED single-value field indicates the usage of content experiments like A/B testing. It MUST contain a single value only.¶
All users are served the same content without any changes. This value MUST NOT be used in conjunction with other values.¶
Content experiments are performed by grouping users randomly into buckets and serving them different content.¶
Content experiments are performed by targeting user based on their geographic location.¶
Content experiments are performed by grouping users into buckets based on their behavior and serving them different content.¶
This OPTIONAL field indicates conformance with existing regulations and legislation. Values for this field SHOULD use all lowercase tokens with whitespace being replaced by the dash character (%x2d). This field SHOULD only be added if it makes the setup described by the file easier to understand for human users.¶
Example values are:¶
This OPTIONAL field indicates which software is being used for collecting analytics. Values for this field SHOULD use all lowercase tokens with whitespace being replaced by the dash character (%x2d). This field SHOULD only be added if it makes the setup described by the file easier to understand for human users.¶
Example values are:¶
# analytics.txt file for www.example.com Author: Jane Doe <doe@example.com> Collects: url, referrer, device-type Stores: first-party-cookies, local-storage # Usage data is encrypted end-to-end Uses: javascript # Users can also delete their usage data only without opting out Allows: opt-in, opt-out # Data is retained for 6 months Retains: P6M # Optional fields Honors: none Tracks: sessions, users Varies: none Shares: per-user Implements: gdpr¶
Author: John Doe <doe@example.com> Collects: url, ip-address, geo-location, user-agent, referrer, device-type, custom-events Stores: none Uses: javascript Allows: none Retains: perpetual¶
# analytics.txt file for www.example.com Author: Jane Doe <doe@example.com> Collects: none¶
By default, an analytics.txt file SHOULD be placed in the ".well-known" path as per [RFC8615] of a domain name or IP address.¶
In case implementors are unable to meet this requirement, other options are available.¶
Implementors MAY signal the location of an analytics.txt file in the context of a HTML document using a link element of rel "analytics"¶
Example:¶
<link rel="analytics" href="https://example.com/resources/analytics.txt">¶
Implementors MAY send an HTTP header of X-Analytics-Txt
with a response, sending the URI of the applicable file.¶
Example:¶
X-Analytics-Txt: https://example.com/resources/analytics.txt¶
In case multiple of these signals are being used, the precedence taken is:¶
An analytics.txt file located in the ".well-known" location MUST only apply to the domain or IP address of the URI used to retrieve it, and SHALL NOT apply to any of its subdomains or parent domains. If the location is signaled using the HTTP Header or in the document markup itself, its scope SHALL be limited to the requested resource only.¶
If distributed in non-standard locations, an analytics.txt file MAY also apply to products and services provided by the organization publishing the file (e.g. desktop or mobile applications) and which cannot be mapped to a domain name or IP address. In such cases, implementors MUST add sufficient commentary describing the applicable scope.¶
If information given in an "analytics.txt" file is incorrect or not kept up to date, this can result in usage of services under wrong assumptions, thus exposing users to possibly unwanted data collection and handling. Not having an "analytics.txt" file may be preferable to having incorrect or stale information in this file. This guideline also applies to field level: in case of ambiguities or uncertainties, it's recommended to omit a field or a value rather than providing incorrect information. Implementors MUST use the "Author" field (see Section 3.4.1) to allow inquiries about the correctness of the given information.¶
Implementors should be aware that disclosing mandatory author information as per Section 3.4.1 in such a file exposes them to possible Spam schemes or spurious requests.¶
In multi-user / multi-tenant environments, it may possible for a single user to take over the location of the "/.well-known/analytics.txt" file which would also apply to others. Organizations should ensure the ".well-known" location is properly protected. Implementors can instead use other locations as per Section 4 in such scenarios.¶
3.1. Comments
Any line beginning with the "#" (%x23) symbol MUST be interpreted as a comment. The content of the comment may contain any ASCII or Unicode characters in the %x21-7E and %x80-FFFFF ranges plus the tab (%x09) and space (%x20) characters.¶
Example:¶
Implementors SHOULD make deliberate use of comments to make an analytics.txt file more accessible for non-technical audiences.¶