Bug 1460851 - Update the HCT docs to mention the NPM dependency. r?chutten,janerik draft
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Mon, 28 May 2018 17:35:27 +0200
changeset 801340 c5ce841d2d3b20c3de2ceec813bd8be56c665376
parent 801339 c5d5b08faa8fa54b18fb597f5ab83230351441cd
push id111645
push userbmo:alessio.placitelli@gmail.com
push dateWed, 30 May 2018 08:43:31 +0000
reviewerschutten, janerik
bugs1460851
milestone62.0a1
Bug 1460851 - Update the HCT docs to mention the NPM dependency. r?chutten,janerik MozReview-Commit-ID: 9LG0TO2ZnYA
toolkit/components/telemetry/docs/collection/hybrid-content.rst
--- a/toolkit/components/telemetry/docs/collection/hybrid-content.rst
+++ b/toolkit/components/telemetry/docs/collection/hybrid-content.rst
@@ -52,19 +52,23 @@ granting permissions to a Mozilla page, 
   }
 
 .. important::
 
     Granted permissions do not disappear when a "go-faster" add-on is uninstalled but are cleared when the browser is closed. If permissions need to be cleaned without closing the browser, it must be done manually. Moreover, permissions are keyed by origin: ``http://mozilla.com`` and ``https://mozilla.com`` are different things.
 
 Including the library
 ---------------------
-To use hybrid content telemetry the relative content JS library needs to be included in the page. We don't have a CDN hosted version that can be readily included in the page. For this reason, each consumer will need to fetch the latest version of the library from `here <https://hg.mozilla.org/mozilla-central/file/tip/toolkit/components/telemetry/hybrid-content/HybridContentTelemetry-lib.js>`_ and add it to the page repository. Then this file can be deployed along with the page.
+To use hybrid content telemetry the related content JS library needs to be included in the page. We have different integration options:
 
-Example:
+* Add ``mozilla-hybrid-content-telemetry`` as a dependency to the project and require it in the code.
+* Load it directly from the external unpkg CDN.
+* Manually fetch the latest version from the `main repository <https://hg.mozilla.org/mozilla-central/file/tip/toolkit/components/telemetry/hybrid-content/HybridContentTelemetry-lib.js>`_ and add it to the page repository. Then this file can be deployed along with the page.
+
+Example (manual inclusion):
 
 .. code-block:: html
 
   <!DOCTYPE html>
   <html>
     <head>
       <!-- Other head stuff -->
       <script type="application/javascript" src="HybridContentTelemetry-lib.js"></script>