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