spree-contrib / spree_analytics_trackers

Integrate your Spree application with Google Analytics and Segment.com
https://spreecommerce.org
BSD 3-Clause "New" or "Revised" License
20 stars 61 forks source link

Instalation Fails #19

Closed radek1991 closed 5 years ago

radek1991 commented 5 years ago

Hey Guys,

So my teammates and I we have a problem with instalation of this gem. Do you have some ideas what might be wrong ? Here is the console output:

/usr/lib/ruby/2.5.0/fileutils.rb:90: warning: already initialized constant FileUtils::VERSION
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:92: warning: previous definition of VERSION was here
/usr/lib/ruby/2.5.0/fileutils.rb:1188: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1267: warning: previous definition of S_IF_DOOR was here
/usr/lib/ruby/2.5.0/fileutils.rb:1446: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1541: warning: previous definition of DIRECTORY_TERM was here
/usr/lib/ruby/2.5.0/fileutils.rb:1448: warning: already initialized constant FileUtils::Entry_::SYSCASE
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1543: warning: previous definition of SYSCASE was here
/usr/lib/ruby/2.5.0/fileutils.rb:1501: warning: already initialized constant FileUtils::OPT_TABLE
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1596: warning: previous definition of OPT_TABLE was here
/usr/lib/ruby/2.5.0/fileutils.rb:1555: warning: already initialized constant FileUtils::LOW_METHODS
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1650: warning: previous definition of LOW_METHODS was here
/usr/lib/ruby/2.5.0/fileutils.rb:1562: warning: already initialized constant FileUtils::METHODS
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1657: warning: previous definition of METHODS was here
Running via Spring preloader in process 40951
Could not find generator 'spree_analytics_trackers:install'. Maybe you meant 'spree_gateway:install', 'canonical_rails:install' or 'spree:auth:install'
Run `rails generate --help` for more options.
damianlegawiec commented 5 years ago

Ha, thanks for creating this issue @radek1991 - indeed it's not working 🤔We'll tackle this tomorrow

LucasKuhn commented 5 years ago

While at it, could you check if conversion is being tracked? I updated Spree and removed the call for the 'google_purchase' partial on my application.html and order/show.html, and the conversion rate is not being tracked properly even since 😅

LucasKuhn commented 5 years ago

Adding to the issue: image It seems that only a few transactions are being tracked.

Using GA debug on console, every step of the transaction looks like it is being sent: image

And the final step is setting the action to purchase: image

But for some reason all my tests did not go to google analytics, only a few random purchases are being tracked 🤔

LucasKuhn commented 5 years ago

Also, the info above is being displayed on GA Debug, but on Google Tag Manager only the page view is being sent: image

And If I record the entire purchase process via tag assistant, indeed no conversion in being tracked: image

devkinoti commented 5 years ago

Could not find generator 'spree_analytics_trackers:install'. Maybe you meant 'spree_paypal_express:install', 'spree_gateway:install' or 'spree:auth:install'

Has the installation been fixed? I'm getting the "could not find generator issue"

theunraveler commented 5 years ago

For me, when I install spree_analytics_trackers, '~> 1.0', the installed gem's directory is empty. I think this may be due to the lack of a Gem::Specification#files declaration in the gemspec. Maybe consider adding something like this: https://github.com/spree/spree_auth_devise/blob/master/spree_auth_devise.gemspec#L17?