mirror of https://github.com/dapr/docs.git
Merge pull request #2084 from greenie-msft/track_tab_clicks_with_google_analytics
Added a google analytics event for clicked tabs
This commit is contained in:
commit
de355b81ae
|
@ -10,7 +10,7 @@
|
|||
<!-- Generate the IDs for the <a> and the <div> elements -->
|
||||
{{- $tabid := printf "%s-%s-tab" $guid $entry | anchorize -}}
|
||||
{{- $entryid := printf "%s-%s" $guid $entry | anchorize -}}
|
||||
<a class="nav-link{{ if eq ($.Scratch.Get "first") true }} active{{ end }}"
|
||||
<a onclick="ga('send', 'event', 'Tabs', 'Clicked', '{{ $.Page.Title }} - {{ $entryid }}');" class="nav-link{{ if eq ($.Scratch.Get "first") true }} active{{ end }}"
|
||||
id="{{ $tabid }}" data-toggle="tab" href="#{{ $entryid }}" role="tab"
|
||||
aria-controls="{{ $entryid }}" aria-selected="{{ $.Scratch.Get "first" }}">
|
||||
{{ . }}
|
||||
|
@ -24,4 +24,4 @@
|
|||
<!-- Inner content - generated by codetab shortcode -->
|
||||
<div class="tab-content" id="{{- $guid -}}-content">
|
||||
{{ .Inner }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue