Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable Heap for docs #1082

Open
annastuchlik opened this issue Apr 17, 2024 · 3 comments
Open

enable Heap for docs #1082

annastuchlik opened this issue Apr 17, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@annastuchlik
Copy link
Collaborator

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
@dgarcia360
Copy link
Collaborator

@annastuchlik Option 2 seems more flexible to not have to distribute a new version of the theme

@annastuchlik
Copy link
Collaborator Author

Let's try to do that using Google Tag manager.

@annastuchlik annastuchlik self-assigned this Apr 30, 2024
@dgarcia360 dgarcia360 added the enhancement New feature or request label Apr 30, 2024
@timkoopmans
Copy link

Any updates on this one team?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants