You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With minimal setup required, you can gain valuable insights into how visitors interact with your site, which can help you make informed decisions to improve conversions, user experience, and overall business strategy.
Note
To set up the Google Analytics integration, you must have a Google Analytics account and an associated property.
Event Tracking
By default, the following events will be tracked in Google Analytics 4:
page_view
first_visit
session_start
user_engagement
search
add_payment_info
add_shipping_info
add_to_cart
add_to_wishlist
begin_checkout
purchase
remove_from_cart
view_cart
view_item
Installation
Add this extension to your Gemfile with this line:
bundleaddspree_google_analytics
Run the install generator
bundleexecrailsgspree_google_analytics:install
Restart your server
If your server was running, restart it so that it can find the assets properly.
Setup
Please follow our setup guide to start tracking all events in Google Analytics dashboard.
Developing
Create a dummy app
bundle update
bundle exec rake test_app
Add your new code
Run tests
bundle exec rspec
When testing your applications integration with this extension you may use it's factories.
Simply add this require statement to your spec_helper: