spree/spree — Issue #1048: undefined local variable or method `analytics_tags'
Author: hoverlover
Created: 2012-01-29 22:53:15+00:00
State: open

I'm using Ruby 1.9.3 and Spree 1.0.0.rc2, and I've enabled analytics via `spree_dash`. Everything seems to work fine, until I try to go to the cart page:

undefined local variable or method `analytics_tags' for #<#:0x007fcdcafd1d68> on line 7

4:
5: <%= render :partial => 'spree/shared/head' %><% if Spree::Dash::Config.configured? %>
6: <%= raw analytics_tags.to_json %>;
8: (function(){
9: var d=document,g=d.createElement('script'),s=d.getElementsByTagName('script')[0];
10: g.type='text/javascript',g.defer=g.async=true;g.src=d.location.protocol+'//c.jirafe.com/jirafe.js';

If I include the `spree_analytics` gem, this doesn't happen, I can navigate to the cart just fine, and it records the hit. The only difference other than the names that I can see between the two is the helper is nested under the `app/helpers/spree` directory in dash, but the helper in the analytics gem is right under the `app/helpers` directory. I don't know why this would make a difference, but I just wanted to point it out.

Let me know if you need any other info for reproducing this.