Skip to content

enable Heap for docs #1082

Open
Open
@annastuchlik

Description

@annastuchlik

Request from @tzach:

Would be interesting to look at the Heatmap of the getting started HP.

How to enable (from @timkoopmans):

heap is not enabled for docs, but it can be added. Couple of different ways:

  1. update layout.html in sphinx_scylladb_theme and push to all repos that use the theme e.g.
> git diff master..feat/add-heap-analytics
> diff --git a/sphinx_scylladb_theme/layout.html b/sphinx_scylladb_theme/layout.html
> index bad2e6e..f40c1d4 100644
> --- a/sphinx_scylladb_theme/layout.html
> +++ b/sphinx_scylladb_theme/layout.html
> @@ -85,6 +85,13 @@
>          <!-- Font Awesome -->
>          <script src="https://kit.fontawesome.com/b1870adf6a.js" crossorigin="anonymous"></script>
>          <!-- End Font Awesome -->
> +
> +        <!-- Heap Analytics -->
> +        <script type="text/javascript">
> +            window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.heapanalytics.com/js/heap-"+e+".js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a);for(var n=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],o=0;o<p.length;o++)heap[p[o]]=n(p[o])};
> +            heap.load("2144880022");
> +        </script>
> +        <!-- End Heap Analytics -->
>      </head>
  1. Add the Heap snippet as a custom HTML tag and set it to fire on All Pages using Google Tag Manager:
<script type="text/javascript"> window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.heapanalytics.com/js/heap-"+e+".js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a);for(var n=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],o=0;o

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions