Skip to content

Commit e3e3895

Browse files
committed
Add gtag() helper function used by star-rating
Originally proposed this change in the `pytorch/pytorch_sphinx_theme` repo as PR#188, but SveKars suggested we try it out in `pytorch/tutorials` which does not have as large a scope.
1 parent 17e81c1 commit e3e3895

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

_templates/layout.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
{{ super() }}
1818
<script>
1919

20-
20+
<!--
21+
Helper function to make it easier to call dataLayer.push()
22+
-->
23+
function gtag(){window.dataLayer.push(arguments);}
24+
2125
//add microsoft link
2226

2327
if(window.location.href.indexOf("/beginner/basics/")!= -1)

0 commit comments

Comments
 (0)