Skip to content

Commit

Permalink
Update requested GTM/heap changes. (platformsh#4229)
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwcarlson authored Oct 16, 2024
1 parent 6c060bd commit fc40f37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion sites/upsun/config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ logolinksto: "https://upsun.com"
logoAlt: "Upsun"
favicon: "images/favicon.ico"

gtm: "GTM-NN9T4G2T"
gtm: "GTM-KJ4F382K"

# Actions in main header
headerActions:
Expand Down
21 changes: 1 addition & 20 deletions themes/psh-docs/layouts/partials/scripts/external.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,4 @@
<!-- End Google Tag Manager -->
<!--
{{ partial "header/gtm_script" . }} -->

<!-- Heap -->
<!-- Initialize Heap with a development value -->
{{ $heapID := "816119933" }}
<!-- Get Heap ID from environment variable for production-->
{{ if eq (string site.Params.vendor.config.version) "1"}}
{{ with os.Getenv "HUGO_HEAP_ID_PLATFORM" }}
{{ $heapID = . }}
{{ end }}
{{ end }}
{{ if eq (string site.Params.vendor.config.version) "2"}}
{{ with os.Getenv "HUGO_HEAP_ID_UPSUN" }}
{{ $heapID = . }}
{{ end }}
{{ end }}
<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("{{ $heapID }}");
</script>
<!-- End Heap -->

0 comments on commit fc40f37

Please sign in to comment.