Skip to content

Commit

Permalink
minor readme and google analytics improvements (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahcarrel authored May 7, 2023
1 parent 68f6852 commit 79a335f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 deletions.
21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,21 @@ Your favorite comics emailed to you each morning.

## Services & Frameworks used
### Client (UI)
1. ES6 Typescript with ESLint & Prettier
1. Typescript with ESLint
1. Vercel CLI for deployment
1. Vercel Next.js for SSR (server-side-rendered) React framework and routing
1. Apollo Client (GraphQL) library for communication with server
1. SCSS modules

### Server (Back-End)
1. ES6 Typescript with ESLint & Prettier
1. Typescript with ESLint
1. Vercel CLI for deployment
1. Vercel-managed node.js server
1. Apollo Server (GraphQL) for communication with client
1. MongoDB Atlas for our database cluster
1. Mongoose for interacting with MongoDB database
1. ElasticEmail for sending emails

### Tech Stack History
We started Inbox Comics in the summer of 2014 as a hacky website built in MySQL
and PHP-interspersed-with-HTML-and-some-CSS, hosted on the first Google result
for "free web hosting provider." It floundered along for a few years, during
which we made minor upgrades such as switching away from PHP sendmail on our
free web hosting provider to other services (we experimented with Mailgun and
AWS before settling on ElasticEmail.) In the fall of 2019 we rebuilt it from
scratch with the more modern technologies described above and threw out all the
old code (it was hosted on Dropbox or something awful like that; we hadn't yet
learned about version control).

## Why this project is open-sourced
Simply because it's a decent template for creating modern web apps. Feel free to
fork this as a template for your own project (deleting all the business logic of
course).

## Developer Instructions
### Getting environment set up.
1. Clone the repo with
Expand Down
14 changes: 10 additions & 4 deletions common-components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,25 @@ export const Layout: React.FunctionComponent<Props> = (props: Props) => {
const siteTitle = "Inbox Comics";
const displayTitle = title ? `${siteTitle} | ${title}` : siteTitle;
const description =
"Get your selection of over 400 comics, including Calvin and Hobbes and xkcd, emailed to you every morning, completely free and never with any ads. Sign up now— it only takes a minute!";
"Get your selection of over 400 comics, including Calvin and Hobbes and Peanuts, emailed to you every morning, completely free and never with any ads. Sign up now— it only takes a minute!";
const googleTagId = process.env.NEXT_PUBLIC_GOOGLE_TAG_ID;
if (googleTagId == null) {
throw new Error(
"NEXT_PUBLIC_GOOGLE_TAG_ID environment variable is not defined.",
);
}
return (
<>
<Script
src="https://www.googletagmanager.com/gtag/js?id=UA-75894353-1"
src={`https://www.googletagmanager.com/gtag/js?id=${googleTagId}`}
strategy="afterInteractive"
/>
<Script id="google-analytics" strategy="afterInteractive">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){window.dataLayer.push(arguments);}
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-75894353-1');
gtag('config', '${googleTagId}');
`}
</Script>
<Head>
Expand Down

1 comment on commit 79a335f

@vercel
Copy link

@vercel vercel bot commented on 79a335f May 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.