|
48 | 48 | }); |
49 | 49 | }); |
50 | 50 |
|
51 | | - $("[data-behavior='was-this-helpful-event']").on('click', function(){ |
52 | | - $(".helpful-question").hide(); |
53 | | - $(".was-helpful-thank-you").show(); |
54 | | - |
55 | | - fbq('trackCustom', "Was this Helpful?", { |
| 51 | + $("[data-behavior='tutorial-rating']").on('click', function(){ |
| 52 | + fbq('trackCustom', "Tutorial Rating", { |
56 | 53 | tutorialLink: window.location.href, |
57 | 54 | tutorialTitle: $('h1:first').text(), |
58 | | - helpful: $(this).attr("data-response") |
59 | | - }); |
60 | | - |
61 | | - gtag('event', $(this).attr("data-response"), { |
62 | | - 'event_category': 'Was this Helpful?', |
63 | | - 'event_label': $(this).attr("data-response") |
| 55 | + rating: $(this).attr("data-count") |
64 | 56 | }); |
65 | 57 |
|
66 | | - gtag('event', $(this).attr("data-response"), { |
67 | | - 'event_category': 'Was this Helpful?', |
68 | | - 'event_label': $("h1").first().text() |
| 58 | + gtag('event', 'click', { |
| 59 | + 'event_category': 'Tutorial Rating', |
| 60 | + 'event_label': $("h1").first().text(), |
| 61 | + 'value': $(this).attr("data-count") |
69 | 62 | }); |
70 | 63 | }); |
71 | 64 |
|
72 | 65 | if (location.pathname == "/") { |
73 | | - $(".helpful-container").hide(); |
| 66 | + $(".rating-container").hide(); |
74 | 67 | $(".hr-bottom").hide(); |
75 | 68 | } |
76 | 69 | </script> |
|
0 commit comments