Bug 1460851 - Update the HCT docs to mention the NPM dependency. r=chutten,janerik
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Mon, 28 May 2018 17:35:27 +0200
changeset 420412 ca5eb1d22bf62ac90724926f73308ecd7285ec1d
parent 420411 634f5d70401b10ea30fb289b65af8f64154f7c18
child 420413 9910c68edd10dbc0861fcacfcc86e8d0bafd6ced
push id34072
push useraiakab@mozilla.com
push dateWed, 30 May 2018 22:00:19 +0000
treeherdermozilla-central@6272dd5e7417 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten, janerik
bugs1460851
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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>