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
144 changes: 54 additions & 90 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,164 +314,128 @@ const config = {
style: 'dark',
links: [
{
title: 'Documentation',
title: 'Flow',
items: [
{
label: 'Getting Started',
to: '/blockchain-development-tutorials/cadence/getting-started/smart-contract-interaction',
label: 'Build with AI',
to: '/blockchain-development-tutorials/use-AI-to-build-on-flow',
},
{
label: "Tools & SDKs",
to: '/build/tools',
},
{
to: 'https://cadence-lang.org/docs/',
label: 'Cadence',
},
{
to: '/blockchain-development-tutorials/cadence/mobile',
label: 'Mobile',
},
{
to: '/build/tools/clients/fcl-js/',
label: 'FCL',
},
{
to: '/build/cadence/smart-contracts/testing',
label: 'Testing',
},
{
to: '/build/tools/flow-cli/',
label: 'CLI',
label: 'Why Flow',
to: '/blockchain-development-tutorials/flow-101',
},
{
to: '/build/tools/emulator/',
label: 'Emulator',
label: 'Tools',
to: '/build/tools',
},
{
href: 'https://github.com/onflow/fcl-dev-wallet',
label: 'Dev Wallet',
label: 'Faucet',
to: '/ecosystem/faucets',
},
{
to: '/build/tools/vscode-extension/',
label: 'VS Code Extension',
label: 'Builder Toolkit',
to: '/ecosystem/developer-support-hub',
},
],
},
{
title: 'Community',
title: 'Cadence',
items: [
{
to: '/ecosystem',
label: 'Ecosystem',
},
{
href: 'https://port.flow.com/',
label: 'Flow Port',
},
{
href: 'https://github.com/onflow/developer-grants',
label: 'Developer Grants',
label: 'Quickstart',
to: '/blockchain-development-tutorials/cadence/getting-started',
},
{
href: 'https://flow.com/flow-responsible-disclosure',
label: 'Responsible Disclosure',
label: 'Build with Forte',
to: '/blockchain-development-tutorials/forte',
},
{
href: 'https://www.flowverse.co/',
label: 'Flowverse',
label: 'Cadence Advantages',
to: '/blockchain-development-tutorials/cadence/cadence-advantages',
},
{
href: 'https://academy.ecdao.org/',
label: 'Emerald Academy',
label: 'React SDK',
to: '/build/tools/react-sdk',
},
{
href: 'https://floats.city/',
label: 'FLOATs (Attendance NFTs)',
},
label: 'Language Reference',
href: 'https://cadence-lang.org/',
}
],
},
{
title: 'Start Building',
title: 'Solidity (EVM)',
items: [
{
href: 'https://play.flow.com/',
label: 'Flow Playground',
},
{
to: 'https://cadence-lang.org/docs/tutorial/first-steps',
label: 'Cadence Tutorials',
label: 'Quickstart',
to: '/build/evm/quickstart',
},
{
href: 'https://cookbook.flow.com',
label: 'Cadence Cookbook',
label: 'Native VRF',
to: '/blockchain-development-tutorials/native-vrf',
},
{
to: '/build/cadence/core-contracts/',
label: 'Core Contracts & Standards',
label: 'Batched Transactions',
to: '/blockchain-development-tutorials/cross-vm-apps',
},
{
href: '/build/evm/quickstart',
label: 'EVM',
},
label: 'Network Information',
href: '/build/evm/networks',
}
],
},
{
title: 'Network',
title: 'Community & Support',
items: [
{
href: 'https://status.flow.com/',
label: 'Network Status',
label: 'Dev Office Hours',
href: 'https://calendar.google.com/calendar/u/0/embed?src=c_47978f5cd9da636cadc6b8473102b5092c1a865dd010558393ecb7f9fd0c9ad0@group.calendar.google.com',
},
{
href: 'https://flowscan.io/',
label: 'Flowscan Mainnet',
label: 'Hackathons and Events',
to: '/ecosystem/Hackathons%20and%20Events',
},
{
href: 'https://testnet.flowscan.io/',
label: 'Flowscan Testnet',
},
{
to: '/protocol/node-ops/node-operation/past-upgrades',
label: 'Past Sporks',
href: 'https://discord.gg/flow',
label: 'Discord',
},
{
to: '/protocol/node-ops',
label: 'Node Operation',
href: 'https://github.com/onflow',
label: 'GitHub',
},
{
to: '/protocol/node-ops/node-operation/network-upgrade',
label: 'Spork Information',
href: 'https://flow.com/careers',
label: 'Careers',
},
],
},
{
title: 'More',
title: 'Network & Resources',
items: [
{
href: 'https://github.com/onflow',
label: 'GitHub',
href: 'https://status.flow.com/',
label: 'Network Status',
},
{
href: 'https://discord.gg/flow',
label: 'Discord',
href: 'https://flowscan.io/',
label: 'Block Explorer',
},
{
href: 'https://forum.flow.com/',
label: 'Forum',
href: 'https://port.flow.com/',
label: 'Flow Port',
},
{
href: 'https://flow.com/',
label: 'Flow',
label: 'Flow Website',
},
{
href: 'https://flow.com/blog',
label: 'Blog',
label: 'Flow Blog',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Flow, Inc. Built with Docusaurus.`,
copyright: `Copyright © ${new Date().getFullYear()} Flow Foundation. All Rights Reserved.`,
},
prism: {
theme: lightCodeTheme,
Expand Down
2 changes: 2 additions & 0 deletions src/constants/ga-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const GA_EVENTS = {
SEARCH_CLICK: 'search_click',
FEEDBACK_CLICK: 'feedback_click',
AUTH_LOGIN: 'login',
FOOTER_CLICK: 'footer_click',
} as const;

// Event categories for consistent tracking - Using existing categories
Expand All @@ -15,6 +16,7 @@ export const GA_CATEGORIES = {
SEARCH: 'search',
FEEDBACK: 'feedback',
AUTH: 'auth',
FOOTER: 'footer',
} as const;

// Event actions for consistent tracking - Using existing actions
Expand Down
36 changes: 36 additions & 0 deletions src/theme/Footer/LinkItem/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from 'react';
import LinkItem from '@theme-original/Footer/LinkItem';
import type {WrapperProps} from '@docusaurus/types';
import { event } from '@site/src/utils/gtags.client';
import { GA_EVENTS, GA_CATEGORIES } from '@site/src/constants/ga-events';

type Props = WrapperProps<typeof LinkItem>;

export default function LinkItemWrapper(props: Props): JSX.Element {
const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {
// Extract meaningful label from props
const label = props.label || props.href || 'unknown-footer-item';

// Check if we're on the homepage
const isHomepage = typeof window !== 'undefined' && window.location.pathname === '/';

// Track the footer link click with appropriate event based on page
event({
action: isHomepage ? GA_EVENTS.ACTION_CARD_CLICK : GA_EVENTS.FOOTER_CLICK,
category: GA_CATEGORIES.FOOTER,
label: label,
location: true,
});

// Call original onClick if it exists
if (props.onClick) {
props.onClick(e);
}
};

return (
<>
<LinkItem {...props} onClick={handleClick} />
</>
);
}