---
title: "example-petstore.com 的历史：2009 年至今"
description: "Google 何时使用 example-petstore.com 和 example-commerce-host.com：2009 年的 Classic Analytics、2014 年的站点链接搜索框及 Search Console。"
url: https://example-petstore.com/zh/history
language: zh-Hans
---

# example-petstore.com 的历史

example-petstore.com 最早出现于 2009年3月的 Google Classic Analytics 文档中。在此后的十五年里，它先后出现在三代 Google 文档中，并被无数次复制。以下每个日期都有存档来源可查。

## 2009 年之前

Google 早期的 Analytics 文档使用的是其他名称。至少从 2007 年到 2010 年，关于第三方购物车的帮助文章使用的是 `www.mystore.com` 和 `www.securecart.com`；而更早的 Classic Analytics 指南“Domains & Directories”截至 2009年3月1日的所有存档版本中，都没有出现宠物商店。

## Classic Analytics，2009–2024

1. **2009年3月** — Google 将 Classic Analytics（`ga.js`）文档重新整理为新的 `tracking/` 部分。重写后的指南“Tracking Multiple Domains”最早存档于 2009年3月27日，其中引入了 www.example-petstore.com 及其子网域 dogs. 和 cats.、位于 `www.example-commerce-host.com/petStoreCart` 的购物车，以及 `_setDomainName(".example-petstore.com")` 和 `_linkByPost('www.example-commerce-host.com/petStoreCart/begin.php')` 等代码。该指南提及宠物商店达 18 次。
2. **2011年** — 关于第三方购物车的帮助文章改用同一对名称：`www.example-petstore.com` 和 `www.example-commerce-host.com/petStoreCart`。
3. **2013–2014年** — developers.google.com 上该指南的异步版本展示了 `_gaq.push(['_setDomainName', 'example-petstore.com'])`，以及指向 `http://dogs.example-petstore.com/intro.html` 的链接“See my pet store”。
4. **2024年7月1日** — Classic Analytics 和 Universal Analytics 文档随 Universal Analytics 一同停用。

## SEO 文档，2014–2019

1. **2014年9月** — 站点链接搜索框的第一版文档使用 `"url": "https://www.example-petstore.com/"`，目标地址为 `host.example-petstore.com/search?q={search_term}`。
2. **2014年9月至 2015年年中** — 流传最广的版本使用 `query.example-petstore.com/search?q={search_term_string}`，并附有文本示例 `www.example-petstore.com/search?q=collars` 和 `…?q=leashes`。
3. **2016年** — Google 的结构化数据文档改用 `example.com`。
4. **2015年4月至少到 2019年1月** — Search Console 关于“地址更改”工具的帮助文档以从 `http://fish.example-petstore.com` 迁移到 `http://example.com` 或 `http://example-petstore.com` 为例。其后续版本仅使用 `example.com`。

## 当前文档

Google 当前针对 Google 代码的指南“Measure activity across multiple domains”开头仍以一个位于 example-petstore.com、商店运行在 example-commerce-host.com/example-petstore 上的网站为例。这句话早在 2021年3月就已出现在其前身页面上。代码示例使用的是 `example.com`，而在该页面的所有译本中，这些域名都保持原样。

## 副本与译本

- **2009年7月** — 一个 Google Groups 讨论帖引用了 `petStoreCart/legalTerms.php` 代码段，这是已知最早的第三方副本。
- **2009–2010年** — 中文和法语的分析类博客沿用了 dogs./cats.example-petstore.com 和 example-commerce-host.com/petStoreCart，未作任何改动。
- **2013年4月** — 一个 WooCommerce 功能请求中原样粘贴了 `_gaq.push(['_setDomainName', 'example-petstore.com']);`。
- **2014–2019年** — SEO 博客（其中包括 2015 年的 Semrush 和 LCN）、论坛以及至少五个 Stack Overflow 问题复制了带有 `query.example-petstore.com` 的搜索框标记。
- **2019年** — 德国的考试备考资料将商店译为 `www.example-zoohandlung.de`，但保留了 `www.example-commerce-host.com/example-zoohandlung/`。

未发现任何软件产品将这些域名作为默认设置提供。副本均来自粘贴的代码段。

## 终结

1. **2023年7月1日** — Universal Analytics 停止处理数据；Classic Analytics 代码同样不再起作用。
2. **2024年7月1日** — Universal Analytics 关停，其文档停用。
3. **2024年11月21日** — Google 停止显示站点链接搜索框。

## 来源

- [3rd-party shopping carts (2007 snapshot)](http://web.archive.org/web/20070517041222/http://www.google.com:80/support/googleanalytics/bin/answer.py?answer=55532) Google Analytics Help via the Wayback Machine
- [Domains & Directories, the earlier guide (1 March 2009 snapshot)](http://web.archive.org/web/20090301024808/http://code.google.com:80/apis/analytics/docs/gaTrackingSite.html) Google Code via the Wayback Machine
- [Tracking Multiple Domains, new version (27 March 2009 snapshot)](http://web.archive.org/web/20090327154737/http://code.google.com:80/apis/analytics/docs/tracking/gaTrackingSite.html) Google Code via the Wayback Machine
- [3rd-party shopping carts (2011 snapshot)](http://web.archive.org/web/20110828104129/http://www.google.com:80/support/analytics/bin/answer.py?answer=55532) Google Analytics Help via the Wayback Machine
- [Tracking Multiple Domains (2013 snapshot)](http://web.archive.org/web/20130115024413/https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite) Google Developers via the Wayback Machine
- [Sitelinks search box (September 2014 snapshot)](https://web.archive.org/web/20140906020658/https://developers.google.com/webmasters/richsnippets/sitelinkssearch) Google Developers via the Wayback Machine
- [Sitelinks search box (2015 snapshot)](https://web.archive.org/web/20150316142805/https://developers.google.com/structured-data/slsb-overview) Google Developers via the Wayback Machine
- [Use the change of address tool (2015 snapshot)](https://web.archive.org/web/20150425234635/https://support.google.com/webmasters/answer/83106?hl=en) Search Console Help via the Wayback Machine
- [Measure activity across multiple domains](https://developers.google.com/tag-platform/devguides/cross-domain) Google Tag Platform
- [Google Groups thread (July 2009)](https://groups.google.com/g/google-analytics-data-export-api/c/vAlssWHVbmM) Google Groups
- [WooCommerce issue #2923 (April 2013)](https://github.com/woocommerce/woocommerce/issues/2923) GitHub
- [Google Analytics Prüfung, Frage 85 (2019)](https://www.seo-woman.de/google-analytics-pruefung-frage-85/) seo-woman.de
- [Universal Analytics has been replaced by Google Analytics 4](https://support.google.com/analytics/answer/11583528) Google Analytics Help
- [Farewell, Sitelinks Search Box](https://developers.google.com/search/blog/2024/10/sitelinks-search-box) Google Search Central Blog
