Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,12 @@ Github languages colors
.gh-language-android::before {
background-color: #30D880;
}
.gh-language-flutter::before {
background-color: #67B1F1;
}
.gh-language-dart::before {
background-color: #045797;
}

.headerSelect {
align-self: center;
Expand Down
1 change: 1 addition & 0 deletions src/cards/ReposCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ function ReposCard({ analyticsTag, icon, withAds }) {
t => !t.githubValues ? false : githubApi.getTrending(t.githubValues[0], since)
)
let values = await Promise.all(promises)
values = values.filter(Boolean)
const nbrTags = values.length
let minLength = Math.min(...values.map(v => v.length))
const data = []
Expand Down
8 changes: 8 additions & 0 deletions src/utils/Analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ const trackReposDateRangeChange = (dateRange) => {
trackEvent('Repos', 'ChangeDateRange', dateRange)
}

const getResolution = () => {
const realWidth = window.screen.width
const realHeight = window.screen.height
return `${realWidth}x${realHeight}`
}

const trackEvent = (category, action, label) => {
if (!process.env.REACT_APP_ANALYTICS_ID) {
console.log('Missing analytics ID')
Expand All @@ -93,6 +99,8 @@ const trackEvent = (category, action, label) => {
['ua', navigator.userAgent],
])

payload.append('sr', getResolution())

if (label) {
payload.append('el', label.capitalize())
}
Expand Down