Skip to content

Commit

Permalink
Minor adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
g3ortega committed Apr 25, 2024
1 parent 4e48ff9 commit f1100de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/utm_conversion/capture/utm_params_middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def store_utm_data(session, utm_params)
return if utm_params.nil? || utm_params == {}

UTMConversion::Session::UTMData.store(session, utm_params)
UTMConversion.storage_adapter.store(session)
UTMConversion.storage_adapter.store(session.id, utm_params)
end
end
end
Expand Down
5 changes: 2 additions & 3 deletions lib/utm_conversion/storage/in_memory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ def initialize
end

def store(session_id, utm_params = nil)
utm_data = utm_params || utm_data(session)
return if utm_data.nil? || utm_data == {}
return if utm_params.nil? || utm_params == {}

@data[session_id] = {
utm_data: utm_data,
utm_data: utm_params,
conversions: []
}
end
Expand Down

0 comments on commit f1100de

Please sign in to comment.