ankane / ahoy_email

First-party email analytics for Rails
MIT License
1.11k stars 137 forks source link

Email link for CLICK ANALYTICS throws 404 #160

Closed Zarmeen-Mustafa closed 10 months ago

Zarmeen-Mustafa commented 10 months ago

Followed ahoy_email 2.2 guide to add click analytics.

Guide followed: https://www.rubydoc.info/gems/ahoy_email#click-analytics Issue: When I click on any link in email it gives 404.

Screenshot 2023-12-14 at 6 10 20 AM Screenshot 2023-12-14 at 6 10 27 AM Screenshot 2023-12-14 at 6 10 34 AM Screenshot 2023-12-14 at 6 12 33 AM Screenshot 2023-12-14 at 6 10 17 AM
Zarmeen-Mustafa commented 10 months ago

fixed by adding mount AhoyEmail::Engine => "/ahoy" inside route.rb. and setting AhoyEmail.api = false in config/initializers/ahoy_email.rb