Skip to content

Commit

Permalink
Merge pull request #76 from medyo/develop
Browse files Browse the repository at this point in the history
v 1.11.1
  • Loading branch information
medyo authored Nov 11, 2021
2 parents cb69a50 + 60abe18 commit accb123
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
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

0 comments on commit accb123

Please sign in to comment.