mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-10 03:30:22 +00:00
Remove trackers and google analytics
This commit is contained in:
@@ -56,4 +56,3 @@
|
||||
|
||||
= render "layouts/bugherd_script"
|
||||
= render "layouts/matomo_tag"
|
||||
= render 'spree/shared/google_analytics'
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
= configurations_sidebar_menu_item Spree.t(:shipping_methods), admin_shipping_methods_path
|
||||
= configurations_sidebar_menu_item Spree.t(:shipping_categories), admin_shipping_categories_path
|
||||
= configurations_sidebar_menu_item t(:enterprise_fees), main_app.admin_enterprise_fees_path
|
||||
= configurations_sidebar_menu_item Spree.t(:analytics_trackers), admin_trackers_path
|
||||
= configurations_sidebar_menu_item t('admin.contents.edit.title'), main_app.edit_admin_contents_path
|
||||
= configurations_sidebar_menu_item t('admin.invoice_settings.edit.title'), main_app.edit_admin_invoice_settings_path
|
||||
= configurations_sidebar_menu_item t('admin.matomo_settings.edit.title'), main_app.edit_admin_matomo_settings_path
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
= tab :order_cycles, url: main_app.admin_order_cycles_path, icon: 'icon-refresh'
|
||||
= tab :orders, :subscriptions, :customer_details, :adjustments, :payments, :return_authorizations, url: admin_orders_path('q[s]' => 'completed_at desc'), icon: 'icon-shopping-cart'
|
||||
= tab :reports, icon: 'icon-file'
|
||||
= tab :general_settings, :mail_method, :image_settings, :tax_categories, :tax_rates, :tax_settings, :zones, :countries, :states, :payment_methods, :taxonomies, :shipping_methods, :shipping_categories, :enterprise_fees, :trackers, :contents, :invoice_settings, :matomo_settings, :stripe_connect_settings, label: 'configuration', icon: 'icon-wrench', url: edit_admin_general_settings_path
|
||||
= tab :general_settings, :mail_method, :image_settings, :tax_categories, :tax_rates, :tax_settings, :zones, :countries, :states, :payment_methods, :taxonomies, :shipping_methods, :shipping_categories, :enterprise_fees, :contents, :invoice_settings, :matomo_settings, :stripe_connect_settings, label: 'configuration', icon: 'icon-wrench', url: edit_admin_general_settings_path
|
||||
= tab :enterprises, :enterprise_relationships, url: main_app.admin_enterprises_path
|
||||
= tab :customers, url: main_app.admin_customers_path
|
||||
= tab :enterprise_groups, url: main_app.admin_enterprise_groups_path, label: 'groups'
|
||||
|
||||
@@ -70,7 +70,5 @@
|
||||
|
||||
%div{"data-hook" => "admin_footer_scripts"}
|
||||
|
||||
= render 'spree/shared/google_analytics'
|
||||
|
||||
%script
|
||||
= raw "Spree.api_key = \"#{try_spree_current_user.try(:spree_api_key).to_s}\";"
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<% if tracker = Spree::Tracker.current %>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', '<%= tracker.analytics_id %>']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
<% if flash[:commerce_tracking] && @order.present? %>
|
||||
<%# more info: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiEcommerce %>
|
||||
_gaq.push(['_addTrans',
|
||||
"<%= j @order.number %>",
|
||||
"",
|
||||
"<%= @order.total %>",
|
||||
"<%= @order.adjustments.tax.sum(:amount) %>",
|
||||
"<%= @order.adjustments.shipping.sum(:amount) %>",
|
||||
"<%= j @order.bill_address.city %>",
|
||||
"<%= j @order.bill_address.state_text %>",
|
||||
"<%= j @order.bill_address.country.name %>"
|
||||
]);
|
||||
<% @order.line_items.each do |line_item| %>
|
||||
_gaq.push(['_addItem',
|
||||
"<%= j @order.number %>",
|
||||
"<%= j line_item.variant.sku %>",
|
||||
"<%= j line_item.variant.product.name %>",
|
||||
"",
|
||||
"<%= line_item.price %>",
|
||||
"<%= line_item.quantity %>"
|
||||
]);
|
||||
<% end %>
|
||||
_gaq.push(['_trackTrans']);
|
||||
<% end %>
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = '//google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -3035,13 +3035,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
new_shipping_category: "New Shipping Category"
|
||||
back_to_shipping_categories: "Back To Shipping Categories"
|
||||
|
||||
analytics_trackers: "Analytics Trackers"
|
||||
no_trackers_found: "No Trackers Found"
|
||||
new_tracker: "New Tracker"
|
||||
add_one: "Add One"
|
||||
google_analytics_id: "Analytics ID"
|
||||
back_to_trackers_list: "Back to Trackers List"
|
||||
|
||||
name: "Name"
|
||||
description: "Description"
|
||||
type: "Type"
|
||||
|
||||
@@ -136,7 +136,6 @@ Spree::Core::Engine.routes.draw do
|
||||
end
|
||||
|
||||
resource :image_settings
|
||||
resources :trackers
|
||||
|
||||
resources :zones
|
||||
resources :countries do
|
||||
|
||||
14
db/migrate/20200404083008_drop_trackers_table.rb
Normal file
14
db/migrate/20200404083008_drop_trackers_table.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class DropTrackersTable < ActiveRecord::Migration
|
||||
def up
|
||||
drop_table :spree_trackers
|
||||
end
|
||||
|
||||
def down
|
||||
create_table :spree_trackers do |t|
|
||||
t.string :environment
|
||||
t.string :analytics_id
|
||||
t.boolean :active, :default => true
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -12,7 +12,6 @@
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20200406085833) do
|
||||
|
||||
create_table "adjustment_metadata", :force => true do |t|
|
||||
t.integer "adjustment_id"
|
||||
t.integer "enterprise_id"
|
||||
@@ -1011,14 +1010,6 @@ ActiveRecord::Schema.define(:version => 20200406085833) do
|
||||
|
||||
add_index "spree_tokenized_permissions", ["permissable_id", "permissable_type"], :name => "index_tokenized_name_and_type"
|
||||
|
||||
create_table "spree_trackers", :force => true do |t|
|
||||
t.string "environment"
|
||||
t.string "analytics_id"
|
||||
t.boolean "active", :default => true
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "spree_users", :force => true do |t|
|
||||
t.string "encrypted_password"
|
||||
t.string "password_salt"
|
||||
|
||||
Reference in New Issue
Block a user