Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Remix issue] Update logic to better detect remix user agents that are currently not being detected/identified as remix #1964

Closed
sqymmore opened this issue Jan 14, 2025 · 0 comments
Assignees

Comments

@sqymmore
Copy link

Currently user agents using the Remix template are flagged using the following pattern: Shopify Remix Library v2.0.1 | Shopify API Library v8.0.2 | Remix

However, in some cases there are user agents that look like Remix and are using some Shopify library but are different: e.g., Shopify API Library v11.6.0 | Remix | Admin API Client v1.0.4 or Shopify Remix Library v3.5.1 | Shopify API Library v11.6.1 | Cloudflare worker | Admin API Client v1.0.4

The goal is to better flag remix user agents that are currently not being identified/detected as Remix by updating the current logic pattern.


-- What are most common user agents where we are not capturing remix?

SELECT user_agent,
COUNT(distinct api_client_id) as app_count
FROM shopify-dw.base.base__sensitive_monorail_graphql_analytics_query_usage
WHERE request_hour > '2025-01-01'
AND lower(user_agent) LIKE('%remix%')
AND lower(user_agent_family) NOT LIKE('%remix%')
GROUP BY 1
ORDER BY 2 DESC

-- Pull list of apps that have a remix user agent that is not identified as remix

WITH remix_apps AS (
SELECT api_client_id,
sum(request_count) as request_count
FROM shopify-dw.base.base__sensitive_monorail_graphql_analytics_query_usage
WHERE request_hour > '2025-01-01'
AND lower(user_agent) LIKE('%remix%')
AND lower(user_agent_family) NOT LIKE('%remix%')
GROUP BY 1
)

SELECT a.api_client_id,
a.app_name,
a.distribution_model,
a.created_at,
a.active_shop_install_count,
a.primary_library_type_7d,
a.library_usage_details,
r.request_count
FROM shopify-dw.mart_build_ecosystem.apps a
INNER JOIN remix_apps r USING (api_client_id)
WHERE a.is_active
ORDER BY active_shop_install_count DESC`

@sqymmore sqymmore self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant