Bug 1460851 - Update the HCT docs to mention the NPM dependency. r?chutten,janerik
MozReview-Commit-ID: 9LG0TO2ZnYA
--- 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>