Skip to content

Commit d5a4244

Browse files
authored
Add customEvent:Rating dimension to gtag (#2777)
To be able to get the rating data through the Google Data API, we need to send the value to the customEvent:Rating dimension
1 parent f88ec5e commit d5a4244

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_templates/layout.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@
8585
tutorialTitle: $('h1:first').text(),
8686
rating: $(this).attr("data-count")
8787
});
88-
8988
gtag('event', 'click', {
9089
'event_category': 'Tutorial Rating',
9190
'event_label': $("h1").first().text(),
92-
'value': $(this).attr("data-count")
91+
'value': $(this).attr("data-count"),
92+
'customEvent:Rating': $(this).attr("data-count") // send to GA custom dimension customEvent:Rating.
9393
});
9494
});
9595

0 commit comments

Comments
 (0)