Skip to content

Commit

Permalink
feat(analytics): add ?ref= parameter on external URLs
Browse files Browse the repository at this point in the history
fix #782
  • Loading branch information
mateusfg7 committed Mar 1, 2024
1 parent 70f55fd commit 89c338b
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 21 deletions.
32 changes: 25 additions & 7 deletions src/app/_components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function Footer() {
<div className="content-container m-auto flex items-center leading-none md:justify-between">
<div className="hidden gap-4 text-neutral-500 dark:text-neutral-400 md:flex">
<Link
href="https://github.com/mateusfg7/mateusf.com/blob/main/LICENSE"
href="https://github.com/mateusfg7/mateusf.com/blob/main/LICENSE/?ref=https://mateusf.com"
rel="license"
>
<span>License</span>
Expand All @@ -33,30 +33,48 @@ export function Footer() {
<span>RSS</span>
<ArrowIcon />
</Link>
<Link href="https://github.com/mateusfg7/mateusf.com" rel="external">
<Link
href="https://github.com/mateusfg7/mateusf.com/?ref=https://mateusf.com"
rel="external"
>
<span>Github</span>
<ArrowIcon />
</Link>
</div>
<div className="text-center text-sm text-neutral-400 dark:text-neutral-500 md:text-right">
Built with{' '}
<Link href="https://nextjs.org/" rel="external">
<Link
href="https://nextjs.org/?ref=https://mateusf.com"
rel="external"
>
Next.js
</Link>
,{' '}
<Link href="https://mdxjs.com/" rel="external">
<Link
href="https://mdxjs.com/?ref=https://mateusf.com"
rel="external"
>
MDX
</Link>
,{' '}
<Link href="https://tailwindcss.com/" rel="external">
<Link
href="https://tailwindcss.com/?ref=https://mateusf.com"
rel="external"
>
Tailwindcss
</Link>{' '}
and{' '}
<Link href="https://velite.js.org/" rel="external">
<Link
href="https://velite.js.org/?ref=https://mateusf.com"
rel="external"
>
Velite
</Link>{' '}
by{' '}
<Link href="https://github.com/mateusfg7" rel="external">
<Link
href="https://github.com/mateusfg7/?ref=https://mateusf.com"
rel="external"
>
Mateus Felipe
</Link>
.
Expand Down
4 changes: 2 additions & 2 deletions src/app/_components/header/mobile-menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ export function MobileMenu() {
title="License"
icon={File}
rel="license"
href="https://github.com/mateusfg7/mateusf.com/blob/main/LICENSE"
href="https://github.com/mateusfg7/mateusf.com/blob/main/LICENSE/?ref=https://mateusf.com"
/>
<OutLink
title="Github"
icon={GithubLogo}
rel="external"
href="https://github.com/mateusfg7/mateusf.com"
href="https://github.com/mateusfg7/mateusf.com/?ref=https://mateusf.com"
/>
<OutLink
title="RSS"
Expand Down
2 changes: 1 addition & 1 deletion src/app/about/sections/about-me.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function AboutMe() {
<a
className="flex items-end justify-center rounded-xl p-2 leading-none underline opacity-70 hover:opacity-100"
target="_blank"
href="https://read.cv/mateusfelipe"
href="https://read.cv/mateusfelipe/?ref=https://mateusf.com"
>
<span>read.cv</span>
<ArrowUpRight className="text-xs" size="1em" />
Expand Down
16 changes: 8 additions & 8 deletions src/app/about/sections/contact/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const contacts: Contact[] = [
<div className="contact-line">
<a
className="inline-flex items-end gap-px hover:underline"
href="https://github.com/mateusfg7"
href="https://github.com/mateusfg7/?ref=https://mateusf.com"
target="_blank"
rel="external"
>
Expand All @@ -80,7 +80,7 @@ const contacts: Contact[] = [
<div className="contact-line">
<a
className="inline-flex items-end gap-px hover:underline"
href="https://www.linkedin.com/in/mateusfg/"
href="https://www.linkedin.com/in/mateusfg/?ref=https://mateusf.com"
target="_blank"
rel="external"
>
Expand All @@ -104,7 +104,7 @@ const contacts: Contact[] = [
<div className="contact-line">
<a
className="inline-flex items-end gap-px hover:underline"
href="https://stackoverflow.com/users/15445504/mateusfg7"
href="https://stackoverflow.com/users/15445504/mateusfg7/?ref=https://mateusf.com"
target="_blank"
rel="external"
>
Expand All @@ -128,7 +128,7 @@ const contacts: Contact[] = [
<div className="contact-line">
<a
className="inline-flex items-end gap-px hover:underline"
href="https://codepen.io/mateusfg7"
href="https://codepen.io/mateusfg7/?ref=https://mateusf.com"
target="_blank"
rel="external"
>
Expand All @@ -152,7 +152,7 @@ const contacts: Contact[] = [
<div className="contact-line">
<a
className="inline-flex items-end gap-px hover:underline"
href="https://www.reddit.com/user/mateusfg7/"
href="https://www.reddit.com/user/mateusfg7/?ref=https://mateusf.com"
target="_blank"
rel="external"
>
Expand All @@ -176,7 +176,7 @@ const contacts: Contact[] = [
<div className="contact-line">
<a
className="inline-flex items-end gap-px hover:underline"
href="https://twitter.com/mateusfg77"
href="https://twitter.com/mateusfg77/?ref=https://mateusf.com"
target="_blank"
rel="external"
>
Expand All @@ -200,7 +200,7 @@ const contacts: Contact[] = [
<div className="contact-line">
<a
className="inline-flex items-end gap-px hover:underline"
href="https://www.instagram.com/mateusfg7/"
href="https://www.instagram.com/mateusfg7/?ref=https://mateusf.com"
target="_blank"
rel="external"
>
Expand All @@ -224,7 +224,7 @@ const contacts: Contact[] = [
<div className="contact-line">
<a
className="inline-flex items-end gap-px hover:underline"
href="https://aur.archlinux.org/account/mateus"
href="https://aur.archlinux.org/account/mateus/?ref=https://mateusf.com"
target="_blank"
rel="external"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function GithubFollowers() {
))}
</div>
<a
href="https://github.com/mateusfg7?tab=followers"
href="https://github.com/mateusfg7?tab=followers&ref=https://mateusf.com"
target="_blank"
className="text-base transition-colors hover:text-black dark:hover:text-white"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function Followers() {
</a>
))}
<a
href="https://github.com/mateusfg7?tab=followers"
href="https://github.com/mateusfg7?tab=followers&ref=https://mateusf.com"
target="_blank"
className="flex items-center justify-center text-sm leading-none transition-colors hover:underline"
>
Expand Down
2 changes: 1 addition & 1 deletion src/app/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function Page() {
</div>
<div className="flex justify-center md:justify-end">
<a
href="https://github.com/mateusfg7/?tab=repositories#"
href="https://github.com/mateusfg7/?tab=repositories&ref=https://mateusf.com"
target="_blank"
className="flex items-end gap-px leading-none opacity-70 transition-opacity hover:opacity-100"
>
Expand Down

0 comments on commit 89c338b

Please sign in to comment.