Skip to content

Commit

Permalink
fix: extracting device type from user agent for tablets
Browse files Browse the repository at this point in the history
  • Loading branch information
lalabuy948 committed Sep 9, 2024
1 parent ad5ae49 commit b0447bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/phoenix_analytics/services/utility.ex
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ defmodule PhoenixAnalytics.Services.Utility do
"""
def get_device_type(agent_string) do
cond do
String.contains?(agent_string, "Mobile") -> "mobile"
String.contains?(agent_string, "Pad") -> "tablet"
String.contains?(agent_string, "Mobile") -> "mobile"
true -> "desktop"
end
end
Expand Down

0 comments on commit b0447bb

Please sign in to comment.