Remove unused piwik-related code

This code requires the variable `_paq` to be set somewhere, but we never
set it.

In the past Decide Madrid added some custom JavaScript using this code.
However, in CONSUL we're using Ahoy to track events, and we don't have
any documentation about adding custom JavaScript to use piwik nor we've
got any other piwik integration.
This commit is contained in:
Javi Martín
2019-07-02 22:29:07 +02:00
parent a9d28bee15
commit f28a5cc49b
2 changed files with 0 additions and 30 deletions

View File

@@ -46,7 +46,6 @@
//= require registration_form //= require registration_form
//= require suggest //= require suggest
//= require forms //= require forms
//= require tracks
//= require valuation_budget_investment_form //= require valuation_budget_investment_form
//= require embed_video //= require embed_video
//= require fixed_bar //= require fixed_bar
@@ -105,7 +104,6 @@ var initialize_modules = function() {
App.RegistrationForm.initialize(); App.RegistrationForm.initialize();
App.Suggest.initialize(); App.Suggest.initialize();
App.Forms.initialize(); App.Forms.initialize();
App.Tracks.initialize();
App.ValuationBudgetInvestmentForm.initialize(); App.ValuationBudgetInvestmentForm.initialize();
App.EmbedVideo.initialize(); App.EmbedVideo.initialize();
App.FixedBar.initialize(); App.FixedBar.initialize();

View File

@@ -1,28 +0,0 @@
App.Tracks =
tracking_enabled: ->
_paq?
set_custom_var: (id, name, value, scope) ->
_paq.push(["setCustomVariable", id, name, value, scope])
_paq.push(["trackPageView"])
track_event: ($this) ->
category = $this.data("track-event-category")
action = $this.data("track-event-action")
_paq.push(["trackEvent", category, action])
initialize: ->
if App.Tracks.tracking_enabled()
$("[data-track-usertype]").each ->
$this = $(this)
usertype = $this.data("track-usertype")
App.Tracks.set_custom_var(1, "usertype", usertype, "visit")
$("[data-track-event-category]").each ->
$this = $(this)
App.Tracks.track_event($this)
$("[data-track-click]").on "click", ->
$this = $(this)
App.Tracks.track_event($this)