Closed silva96 closed 2 years ago
Hey @silva96, a few things you could try:
skip_before_action :track_ahoy_visit
to the Devise controllerif params[:utm_campaign] && current_visit && !current_visit.utm_campaign
current_visit.update!(utm_campaign: params[:utm_campaign])
end
ahoy.track("Viewed notifications", params.slice(:utm_campaign))
Thanks! I will try
Hi, I have a situation where I send an email to a user with a link like
https://mydomain.com/notifications?utm_campaign=campaign1
which needs the user to be logged in.Then Devise redirects to
https://mydomain.com/users/sign_in
and a visit is created with landinghttps://mydomain.com/users/sign_in
After successful login it redirects back to
https://mydomain.com/notifications?utm_campaign=campaign1
After login, the visit is automatically asociated with the user, but utm_campaign is not.
How would you solve this problem? I need to know how many users saw the page "notifications" with that campaign.