Skip to content

Commit

Permalink
Remove google-analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
Redande committed Jun 14, 2023
1 parent 8ef6add commit 7c73263
Show file tree
Hide file tree
Showing 18 changed files with 62 additions and 138 deletions.
10 changes: 0 additions & 10 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,6 @@ module.exports = {
]
}
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: "UA-47575342-9",
// Puts tracking script in the head instead of the body
head: false,
// Setting this parameter is optional
anonymize: true
}
},
{
resolve: `gatsby-plugin-sitemap`,
options: {
Expand Down
39 changes: 0 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"gatsby": "^3.7.1",
"gatsby-plugin-anchor-links": "^1.2.1",
"gatsby-plugin-catch-links": "^3.7.1",
"gatsby-plugin-google-analytics": "^3.7.1",
"gatsby-plugin-i18next": "^1.1.10",
"gatsby-plugin-manifest": "^3.7.1",
"gatsby-plugin-material-ui": "^3.0.1",
Expand Down
29 changes: 14 additions & 15 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useContext } from "react"
import styled from "styled-components"
import BackgroundImage from "../images/banner.svg"
import { Card, CardContent } from "@material-ui/core"
import { OutboundLink } from "gatsby-plugin-google-analytics"
import { Link } from "gatsby"
import { withTranslation } from "react-i18next"
import withSimpleErrorBoundary from "../util/withSimpleErrorBoundary"
Expand Down Expand Up @@ -109,14 +108,14 @@ const Footer = ({ t }) => {
<StyledCard>
<StyledCardContent>
<GithubContainer>
<OutboundLink
<a
href={CourseSettings.githubUrl}
target="_blank"
rel="noopener noreferrer"
>
<StyledIcon icon={faGithub} size="3x" title={t("footer-src")} />
<div>{t("footer-src")}</div>
</OutboundLink>
</a>
</GithubContainer>
<ButtonContainer>
<Button to="/report-issue">{t("footer-report-issue")}</Button>
Expand All @@ -128,60 +127,60 @@ const Footer = ({ t }) => {
</ButtonContainer>
<ContentContainer>
{t("makers")}{" "}
<OutboundLink
<a
href="https://www.helsinki.fi/en/researchgroups/data-driven-education"
target="_blank"
rel="noopener noreferrer"
>
{t("rage")}
</OutboundLink>
</a>
.
</ContentContainer>

<ContentContainer>
<Link to="/credits">{t("credits")}</Link>.
</ContentContainer>
<SocialContainer>
<OutboundLink
<a
href="https://twitter.com/moocfi"
target="_blank"
rel="noopener noreferrer"
aria-label={t("twitter-aria")}
>
<StyledIcon icon={faTwitter} size="3x" />
</OutboundLink>
<OutboundLink
</a>
<a
href="https://www.facebook.com/Moocfi"
target="_blank"
rel="noopener noreferrer"
aria-label={t("facebook-aria")}
>
<StyledIcon icon={faFacebook} size="3x" />
</OutboundLink>
<OutboundLink
</a>
<a
href="https://www.youtube.com/channel/UCkHoQ5p9skFdyjrV3_tnUrA"
target="_blank"
rel="noopener noreferrer"
aria-label={t("facebook-aria")}
>
<StyledIcon icon={faYoutube} size="3x" />
</OutboundLink>
</a>
</SocialContainer>
<BrandsContainer>
<OutboundLink
<a
href="https://helsinki.fi"
target="_blank"
rel="noopener noreferrer"
>
<img alt="Helsingin yliopisto" src={UHLogo} />
</OutboundLink>
<OutboundLink
</a>
<a
href="https://mooc.fi"
target="_blank"
rel="noopener noreferrer"
>
<img alt="MOOC.fi" src={MoocfiLogo} />
</OutboundLink>
</a>
</BrandsContainer>
</StyledCardContent>
</StyledCard>
Expand Down
6 changes: 2 additions & 4 deletions src/components/user/CourseOptionsEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import {
TextField,
} from "@material-ui/core"

import { OutboundLink } from "gatsby-plugin-google-analytics"

import {
courseVariants,
updateUserDetails,
Expand Down Expand Up @@ -350,14 +348,14 @@ class CourseOptionsEditor extends React.Component {

<p>
{this.props.t("research5")}
<OutboundLink
<a
href="https://dl.acm.org/citation.cfm?id=2858798"
target="_blank"
rel="noopener noreferrer"
>
Educational Data Mining and Learning Analytics in Programming:
Literature Review and Case Studies
</OutboundLink>
</a>
.
</p>

Expand Down
9 changes: 2 additions & 7 deletions src/components/user/CreateAccountForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { TextField, Button } from "@material-ui/core"
import { createAccount, authenticate } from "../../services/moocfi"
import { capitalizeFirstLetter } from "../../util/strings"
import { navigate } from "gatsby"
import { OutboundLink } from "gatsby-plugin-google-analytics"
import { withTranslation } from "react-i18next"
import styled from "styled-components"
import withSimpleErrorBoundary from "../../util/withSimpleErrorBoundary"
Expand Down Expand Up @@ -153,13 +152,9 @@ class CreateAccountForm extends React.Component {
<Form onChange={this.validate}>
<InfoBox>
{this.props.t("courseUses")}{" "}
<OutboundLink
href="https://mooc.fi"
target="_blank"
rel="noopener noreferrer"
>
<a href="https://mooc.fi" target="_blank" rel="noopener noreferrer">
mooc.fi
</OutboundLink>{" "}
</a>{" "}
{this.props.t("courseUses2")}
</InfoBox>

Expand Down
29 changes: 12 additions & 17 deletions src/pages/credits.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react"
import Helmet from "react-helmet"
import Layout from "../templates/Layout"
import Container from "../components/Container"
import { OutboundLink } from "gatsby-plugin-google-analytics"
import { withLoginStateContext } from "../contexes/LoginStateContext"

const Credits = () => (
Expand All @@ -12,13 +11,13 @@ const Credits = () => (
<h1>Kiitokset ja materiaalista</h1>
<p>
Kurssin on tehnyt Helsingin yliopiston{" "}
<OutboundLink
<a
href="https://www.helsinki.fi/en/researchgroups/data-driven-education"
target="_blank"
rel="noopener noreferrer"
>
Agile Education Research -tutkimusryhmä
</OutboundLink>
</a>
.
</p>
<h2>Kurssimateriaali</h2>
Expand All @@ -30,13 +29,13 @@ const Credits = () => (
</p>
<p>
Kurssin materiaali on lisensoitu{" "}
<OutboundLink
<a
href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.fi"
target="_blank"
rel="noopener noreferrer"
>
Creative Commons BY-NC-SA 4.0
</OutboundLink>{" "}
</a>{" "}
-lisenssillä, joten voit käyttää ja levittää sitä vapaasti, kunhan
alkuperäisten tekijöiden nimiä ei poisteta. Jos teet muutoksia
materiaaliin ja haluat levittää muunneltua versiota, se täytyy
Expand All @@ -48,37 +47,33 @@ const Credits = () => (

<p>
Kurssisivuston ovat tehneet{" "}
<OutboundLink
<a
href="https://github.com/nygrenh"
target="_blank"
rel="noopener noreferrer"
>
Henrik Nygren
</OutboundLink>{" "}
</a>{" "}
ja{" "}
<OutboundLink
<a
href="https://github.com/redande"
target="_blank"
rel="noopener noreferrer"
>
Antti Leinonen
</OutboundLink>
</a>
. Helsingin yliopiston{" "}
<OutboundLink
<a
href="https://www.helsinki.fi/en/researchgroups/data-driven-education"
target="_blank"
rel="noopener noreferrer"
>
Agile Education Research -tutkimusryhmä
</OutboundLink>{" "}
</a>{" "}
on luonut kurssilla käytetyn ohjelmointitehtävien palautusympäristön (
<OutboundLink
href="https://tmc.mooc.fi"
target="_blank"
rel="noopener noreferrer"
>
<a href="https://tmc.mooc.fi" target="_blank" rel="noopener noreferrer">
Test My Code
</OutboundLink>
</a>
) ja sen liitännäiset ohjelmointiympäristöihin, kurssimateriaalissa
olevan kyselyjärjestelmän ja muut toiminnot.
</p>
Expand Down
13 changes: 6 additions & 7 deletions src/pages/edit-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react"
import Helmet from "react-helmet"
import Layout from "../templates/Layout"
import Container from "../components/Container"
import { OutboundLink } from "gatsby-plugin-google-analytics"
import { withLoginStateContext } from "../contexes/LoginStateContext"
import { Button, Typography } from "@material-ui/core"
import CourseSettings from "../../course-settings"
Expand Down Expand Up @@ -45,31 +44,31 @@ class EditPage extends React.Component {
<p>{this.props.t("editPage1")}</p>
<p>
{this.props.t("editPage2")}{" "}
<OutboundLink
<a
external="true"
href={`${this.state.loginThenEditPath}`}
target="_blank"
rel="noopener noreferrer"
>
{this.props.t("editPage3")}
</OutboundLink>
</a>
</p>

<p>
{this.props.t("editPage4")}{" "}
<OutboundLink
<a
external="true"
href={`${CourseSettings.githubUrl.concat("/pulls")}`}
target="_blank"
rel="noopener noreferrer"
>
{this.props.t("editPage3")}
</OutboundLink>{" "}
</a>{" "}
{this.props.t("editPage5")}
</p>

<center>
<OutboundLink
<a
external="true"
href={`${this.state.editPath}`}
target="_blank"
Expand All @@ -79,7 +78,7 @@ class EditPage extends React.Component {
{this.props.t("editPageButtonText")}
{this.state.path}
</Button>
</OutboundLink>
</a>
</center>

<br />
Expand Down
Loading

0 comments on commit 7c73263

Please sign in to comment.