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