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

Added a google analytics event for clicked tabs #2084

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions daprdocs/layouts/shortcodes/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}">
{{ . }}
Expand All @@ -24,4 +24,4 @@
<!-- Inner content - generated by codetab shortcode -->
<div class="tab-content" id="{{- $guid -}}-content">
{{ .Inner }}
</div>
</div>