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 -->
|
<!-- Generate the IDs for the <a> and the <div> elements -->
|
||||||
{{- $tabid := printf "%s-%s-tab" $guid $entry | anchorize -}}
|
{{- $tabid := printf "%s-%s-tab" $guid $entry | anchorize -}}
|
||||||
{{- $entryid := printf "%s-%s" $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"
|
id="{{ $tabid }}" data-toggle="tab" href="#{{ $entryid }}" role="tab"
|
||||||
aria-controls="{{ $entryid }}" aria-selected="{{ $.Scratch.Get "first" }}">
|
aria-controls="{{ $entryid }}" aria-selected="{{ $.Scratch.Get "first" }}">
|
||||||
{{ . }}
|
{{ . }}
|
||||||
|
|
Loading…
Reference in New Issue