Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed Google Analytic tracking code #37

Merged
merged 1 commit into from
Aug 27, 2018
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
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"classnames": "^2.2.5",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-ga": "^2.5.2",
"react-router": "^4.2.0",
"react-scroll": "^1.7.9",
"react-static": "^5.7.1",
Expand Down
3 changes: 1 addition & 2 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ export default {
tabTypes: {
WIZARD: 'wizard',
LAY_HALF: 'layout_half'
},
GA_ID: 'UA-39610124-17'
}
};
4 changes: 2 additions & 2 deletions src/containers/404.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import withTracker from './partials/withTracker';
import Wrapper from './partials/wrapper';
//
class NotFound extends React.Component {
render() {
Expand All @@ -12,5 +12,5 @@ class NotFound extends React.Component {
}

export default () => (
withTracker(NotFound)
Wrapper(NotFound)
);
2 changes: 0 additions & 2 deletions src/containers/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { Router, Link } from 'react-static';
import { hot } from 'react-hot-loader';
import ReactGA from 'react-ga';

//
import Routes from 'react-static-routes';
Expand All @@ -21,7 +20,6 @@ class App extends React.Component {

componentDidMount() {
window.addEventListener('scroll', this.handleScroll);
ReactGA.pageview(window.location.pathname + window.location.search);
}

handleScroll(e) {
Expand Down
4 changes: 2 additions & 2 deletions src/containers/core_technology.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { withRouteData } from 'react-static'
//
import withTracker from './partials/withTracker';
import Wrapper from './partials/wrapper';
import NetworkLayers from '../../public/images/network_layer.svg';

class CoreDeveloper extends React.Component {
Expand Down Expand Up @@ -165,5 +165,5 @@ class CoreDeveloper extends React.Component {
}

export default withRouteData(({ data }) => (
withTracker(CoreDeveloper, data)
Wrapper(CoreDeveloper, data)
))
4 changes: 2 additions & 2 deletions src/containers/discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { withRouteData } from 'react-static'
import classNames from 'classnames';
import Tabs from './partials/tabs'
import withTracker from './partials/withTracker';
import Wrapper from './partials/wrapper';
//
import EcoSystemBanner from '../../public/images/ecosystem_banner.svg'
import Auth1 from '../../public/images/auth_1.png'
Expand Down Expand Up @@ -215,5 +215,5 @@ class Discover extends React.Component {
}

export default withRouteData(({ data }) => (
withTracker(Discover, data)
Wrapper(Discover, data)
));
4 changes: 2 additions & 2 deletions src/containers/home.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { withRouteData, Link } from 'react-static'
//
import withTracker from './partials/withTracker';
import Wrapper from './partials/wrapper';
import Contribute from '../../public/images/contribute.svg';
import Roadmap from '../../public/images/roadmap.png';

Expand Down Expand Up @@ -123,5 +123,5 @@ class Home extends React.Component {
}

export default withRouteData(({ data }) => (
withTracker(Home, data)
Wrapper(Home, data)
));
4 changes: 2 additions & 2 deletions src/containers/licensing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { withRouteData } from 'react-static'
//
import withTracker from './partials/withTracker';
import Wrapper from './partials/wrapper';
import CONST from '../constants';

class Licensing extends React.Component {
Expand Down Expand Up @@ -58,5 +58,5 @@ class Licensing extends React.Component {
}

export default withRouteData(({ data }) => (
withTracker(Licensing, data)
Wrapper(Licensing, data)
));
25 changes: 0 additions & 25 deletions src/containers/partials/withTracker.js

This file was deleted.

11 changes: 11 additions & 0 deletions src/containers/partials/wrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

export default function wrapper(Comp, data = {}, options = {}) {
class HOC extends React.Component {
render() {
return <Comp data={data} {...this.props} />;
}
};

return <HOC />;
}
4 changes: 2 additions & 2 deletions src/containers/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { withRouteData, Link } from 'react-static'
import SyntaxHighlighter from 'react-syntax-highlighter/prism';
import { duotoneLight } from 'react-syntax-highlighter/styles/prism';
import classNames from 'classnames';
import withTracker from './partials/withTracker';
import Wrapper from './partials/wrapper';
import { parsePlatformData } from '../../parser';
import { animateScroll as scroll } from 'react-scroll';

Expand Down Expand Up @@ -117,5 +117,5 @@ class Platform extends React.Component {
}

export default withRouteData(({ data }) => (
withTracker(Platform, data)
Wrapper(Platform, data)
));
4 changes: 2 additions & 2 deletions src/containers/start_developing.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { withRouteData } from 'react-static'

import CONST from '../constants';
import withTracker from './partials/withTracker';
import Wrapper from './partials/wrapper';

import IntroImage from '../../public/images/app_dev_intro.svg';
import WHMLogo from '../../public/images/web_hosting_manager_rgb.svg';
Expand Down Expand Up @@ -174,5 +174,5 @@ class AppDev extends React.Component {
}

export default withRouteData(({ data }) => (
withTracker(AppDev, data)
Wrapper(AppDev, data)
));
3 changes: 0 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import ReactDOM from 'react-dom'
import ReactGA from 'react-ga'

// Your top level component
import CONST from './constants'
Expand All @@ -9,8 +8,6 @@ import App from './containers/app'
// Export your top level component as JSX (for static rendering)
export default App

ReactGA.initialize(CONST.GA_ID);

// Render your app
if (typeof document !== 'undefined') {
const renderMethod = module.hot ? ReactDOM.render : ReactDOM.hydrate || ReactDOM.render
Expand Down
16 changes: 0 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6375,13 +6375,6 @@ react-error-overlay@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-3.0.0.tgz#c2bc8f4d91f1375b3dad6d75265d51cd5eeaf655"

react-ga@^2.5.2:
version "2.5.2"
resolved "https://registry.yarnpkg.com/react-ga/-/react-ga-2.5.2.tgz#1574b26e30ed668e4e74735527314393b22c55a9"
optionalDependencies:
prop-types "^15.6.0"
react "^15.6.2 || ^16.0"

react-helmet@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-5.2.0.tgz#a81811df21313a6d55c5f058c4aeba5d6f3d97a7"
Expand Down Expand Up @@ -6542,15 +6535,6 @@ react@15:
object-assign "^4.1.0"
prop-types "^15.5.10"

"react@^15.6.2 || ^16.0":
version "16.3.2"
resolved "https://registry.yarnpkg.com/react/-/react-16.3.2.tgz#fdc8420398533a1e58872f59091b272ce2f91ea9"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"

react@^16, react@^16.0.0:
version "16.3.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.3.0.tgz#fc5a01c68f91e9b38e92cf83f7b795ebdca8ddff"
Expand Down