Online Analytics Policy
Overview
This Policy sets forth the guidelines relating to agency use of online analytics on Official City Websites.
Purpose
The city measures analytics on its websites to understand visitor behavior and user experience at an aggregate level using analytics tags and cookies on a visitor’s browser or device. This Policy requires analytics tags and cookies to be implemented through the OTI managed Citywide Tag Management System after the effective date of this policy. Attendant data is to be collected solely for the purposes outlined in this policy and shall not be used to re-identify individuals.
Scope
This Policy applies to Official City Websites. All other websites representing the City (i.e., websites that are outside the .gov top-level domain and not hosted or supported by OTI) are highly encouraged to follow this Policy.
This Policy applies to online analytics, marketing tags, and cookies.
This Policy does not apply to tags and cookies required for features of city websites such as translations, on-site search, or similar functions. Additionally, this Policy does not apply to data or identifying information collected by a user explicitly filling out forms or other data entry. Nothing in this Policy prohibits the City from complying with legal orders to disclose analytics data, when required.
Authority
Chapter 48 of the NYC Charter promulgates authority and oversight with respect to all Citywide information technology, information security, information privacy and telecommunications.
Terms and definitions
A/B Testing: A method that compares two versions of a webpage, email, or ad to determine which one performs better.
Cookie: A small piece of data sent from a website and stored on the user’s computer by the user’s web browser while the user is browsing. Cookies are typically used to remember stateful information (such as items added in the shopping cart in an online store) or to record the user’s browsing activity (including clicking particular buttons, logging in, or recording which pages were visited in the past).
Data: Facts and statistics collected together for reference or analysis.
Dynamic Tags: In digital advertising, dynamic or programmatic tags are snippets of HTML or JavaScript that can dynamically insert code onto a website where the tags are implemented to track user behavior and facilitate the display of customized advertising content, also known as dynamic ad buys. Dynamic Tags expose City systems to malicious scripts that can be injected onto the city website.
Identifying Information: Any information obtained by or on behalf of the City that may be used on its own or with other information to identify or locate an individual.
Official City Websites: All websites on the nyc.gov domain, as well as any other website where content is controlled by OTI.
Online Analytics: The process of collecting, analyzing data about website usage to understand user behavior and improve online user experience and performance.
Tags: Short pieces of code written in JavaScript that perform a specific task on a website. Such code is typically used to facilitate site features, analytics, audience measurement, personalization, A/B testing, ad servers, behavioral retargeting, and conversion tracking.
Tag Management System: A technology that helps to manage the lifecycle of online analytics and marketing tags. Tag management systems replace multiple tags with a single container tag and subsequently prioritize and trigger individual Tags, as appropriate, based on business rules, navigation events and known data.
Roles and responsibilities
OTI is responsible for the creation and enforcement of this Policy, and providing oversight and governance of the Citywide Tag Management System and web analytics, such as Google Analytics and performance marketing tags.
Agencies are responsible for ensuring that all data and identifying information collected for online analytics has a clear and intended purpose (such as improving user experience, optimizing website performance or measuring advertising performance) and complies with all applicable law and policy. Agencies must remove all Tags from city websites upon the completion of the intended purpose.
Agencies must only collect data and identifying information at an aggregate level and that data and identifying information cannot be used by any party to identify users who accessed the website.
Policy
- City websites shall not collect analytics unless the value of collection outweighs the underlying privacy risks. Value is determined by how it can help improve user experience, optimize website performance, or measure ad performance.
- Agencies shall not collect, use, or disclose identifying information through Online Analytics on Official City Websites, and must operate in compliance with relevant City law and policy.
- Agencies must consult with relevant stakeholders, which may include their agency privacy officers, agency chief information security officers, agency website development staff, and OTI, to assess the privacy and cybersecurity impact of online analytics tools that are actively in use or under consideration.
- Online Analytics Tags must be implemented through OTI Citywide Tag Management System that centrally manages and governs all data collection through tags. Should an agency be interested in utilizing tags, they must work with OTI to set their tags.
- Dynamic Tags cannot be implemented on City websites.
- All contracts for services that involve the use of Tags or Cookies must require the vendor to comply with this Policy.
- Online Analytics may not be shared with third parties unless those third parties are providing a service to the City and terms are in place for usage of that data.
- Each Tag must have an expiration date set at the time of its implementation, based on its purpose. This date can only be extended if the Tag is still required to fulfill its intended purpose. No Tags should remain up indefinitely and will be reviewed annually by OTI.
Governance
All Online Analytics and marketing tags must be implemented through the Citywide Tag Management System by July 1, 2026.
OTI will periodically scan nyc.gov web pages to identify and remove Tags which are not implemented through the Citywide Tag Management System.
Agencies should consult with their General Counsel when entering into contracts that fall within the scope of this Policy.
Related policies and procedures
This Policy works in conjunction with the following policies:
- NYC.gov Privacy Policy
- NYC Public Digital Experiences Policy
- City Website Content Requirements
- NYC Cyber Command Policies
Ownership information
This Policy is owned by OTI Strategic Initiatives, Digital Service unit. Contact us with questions about this Policy.
Change history
| Version | Change Description | Author(s) | Effective Date |
| 1.0 | First Version | Kesone Phimmasone, Chief Digital Strategy Officer | 11/1/2025 |