tweak matomo tracking
This commit is contained in:
@@ -94,8 +94,8 @@
|
||||
<% if !CurrentUser.opt_out_mixpanel? %>
|
||||
window._paq.push(["setCustomVariable", 1, "level", <%= CurrentUser.level %>, "visit"]);
|
||||
window._paq.push(["setCustomVariable", 2, "age", <%= ((Time.now - CurrentUser.created_at) / 1.year).to_i %>, "visit"]);
|
||||
window._paq.push(["setCustomVariable", 3, "postUpdateCount", <%= CurrentUser.post_update_count %>, "visit"]);
|
||||
window._paq.push(["setCustomVariable", 4, "favoriteCount", <%= CurrentUser.favorite_count %>, "visit"]);
|
||||
window._paq.push(["setCustomVariable", 3, "postUpdateCount", <%= CurrentUser.post_update_count.to_i / 100 %>, "visit"]);
|
||||
window._paq.push(["setCustomVariable", 4, "favoriteCount", <%= CurrentUser.favorite_count.to_i / 100 %>, "visit"]);
|
||||
<% end %>
|
||||
</script>
|
||||
<%= yield :html_header %>
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
<script>
|
||||
window._paq = window._paq || [];
|
||||
window._paq.push(["setCustomVariable", 1, "rating", '<%= j @post.rating %>', "page"]);
|
||||
window._paq.push(["setCustomVariable", 2, "fileSize", <%= @post.file_size %>, "page"]);
|
||||
window._paq.push(["setCustomVariable", 2, "fileSize", <%= @post.file_size.to_i / 100.kilobytes %>, "page"]);
|
||||
window._paq.push(["setCustomVariable", 3, "sourceDomain", '<%= j @post.source_domain %>', "page"]);
|
||||
window._paq.push(["setCustomVariable", 3, "blocked", <%= @post.levelblocked? %>, "page"]);
|
||||
</script>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
$(function() {
|
||||
$(".stripe").submit(function(e) {
|
||||
window._paq = window._paq || [];
|
||||
window._paq.push(['trackEvent', 'clickedAccountUpgrade']);
|
||||
window._paq.push(['trackEvent', 'accounts', 'clickedAccountUpgrade']);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<script>
|
||||
$(function() {
|
||||
window._paq = window._paq || [];
|
||||
window._paq.push(['trackEvent', 'viewAccountUpgrade']);
|
||||
window._paq.push(['trackEvent', 'accounts', 'viewAccountUpgrade']);
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
$(function() {
|
||||
$("#sign-up-link").click(function() {
|
||||
window._paq = window._paq || [];
|
||||
window._paq.push(['trackEvent', 'clickedSignUpLink']);
|
||||
window._paq.push(['trackEvent', 'accounts', 'clickedSignUpLink']);
|
||||
});
|
||||
$("#hide-sign-up-notice").click(function() {
|
||||
window._paq = window._paq || [];
|
||||
window._paq.push(['trackEvent', 'clickedHideSignUpLink']);
|
||||
window._paq.push(['trackEvent', 'accounts', 'clickedHideSignUpLink']);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user