<% content_for :head do %> <% if Rails.env.production? %> <%= stylesheet_link_tag 'https://api.jirafe.com/dashboard/css/spree_ui.css', :media => 'all' %> <%= javascript_include_tag 'https://jirafe.com/dashboard/js/spree_namespaced_ui.js' %> <% end %> <% end %> <% if Rails.env.production? %> <% if Spree::Dash::Config.configured? %>

<%= t(:overview) %>

<%= javascript_tag :defer => 'defer' do %> jirafe.jQuery('#jirafe').jirafe({ api_url: 'https://api.jirafe.com/v1', api_token: '<%= Spree::Dash::Config.token %>', app_id: '<%= Spree::Dash::Config.app_id %>', version: 'spree-v0.1.0', locale: '<%= Spree::Dash::Config.locale %>' }); setTimeout(function() { if ($('mod-jirafe') == undefined) { $('messages').insert (""); } }, 10000); <% end %>
<%= raw jirafe_locale_links.join(' | ') %>
<% else %>
<%= image_tag 'analytics_dashboard_preview.png', :alt => 'Spree Analytics' %>

<%= link_to content_tag(:span, t(:activate)), admin_analytics_sign_up_path, :class => 'button green' %> <%= t(:or) %>   <%= link_to content_tag(:span, t(:learn_more)), "http://spreecommerce.com/blog/2012/01/31/introducing-spree-analytics/", :class => 'button', :target => '_blank' %>
<% end %> <% end %>