Split comments into parts (#3082)
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
This commit is contained in:
parent
b015a1ece3
commit
38eb7f858a
@ -59,9 +59,18 @@ function sendFeedback() {
|
|||||||
|
|
||||||
if (helpful === 'none' && comment === 'none') return;
|
if (helpful === 'none' && comment === 'none') return;
|
||||||
|
|
||||||
|
// split the comment into 100-char parts because of GA limitation on custom dimensions
|
||||||
|
const commentLines = ["", "", "", ""];
|
||||||
|
for (let i = 0; i <= (comment.length - 1)/100; i++) {
|
||||||
|
commentLines[i] = comment.substring(i * 100, Math.min((i + 1)*100, comment.length));
|
||||||
|
}
|
||||||
|
|
||||||
gtag('event', 'feedback_click', {
|
gtag('event', 'feedback_click', {
|
||||||
'helpful': helpful,
|
'helpful': helpful,
|
||||||
'comment': comment
|
'comment': commentLines[0],
|
||||||
|
'comment_2': commentLines[1],
|
||||||
|
'comment_3': commentLines[2],
|
||||||
|
'comment_4': commentLines[3],
|
||||||
});
|
});
|
||||||
|
|
||||||
// show the hidden feedback text
|
// show the hidden feedback text
|
||||||
|
Loading…
x
Reference in New Issue
Block a user