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:
@@ -46,7 +46,6 @@
|
||||
//= require registration_form
|
||||
//= require suggest
|
||||
//= require forms
|
||||
//= require tracks
|
||||
//= require valuation_budget_investment_form
|
||||
//= require embed_video
|
||||
//= require fixed_bar
|
||||
@@ -105,7 +104,6 @@ var initialize_modules = function() {
|
||||
App.RegistrationForm.initialize();
|
||||
App.Suggest.initialize();
|
||||
App.Forms.initialize();
|
||||
App.Tracks.initialize();
|
||||
App.ValuationBudgetInvestmentForm.initialize();
|
||||
App.EmbedVideo.initialize();
|
||||
App.FixedBar.initialize();
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user