Commit 00490b19 authored by Nitin Jadhav's avatar Nitin Jadhav
Browse files

added google analytics code for react app

parent 251fc4dc
Pipeline #194310 passed with stages
in 4 minutes and 29 seconds
import { Alerts } from "components/alerts/Alerts";
import { createBrowserHistory } from "history";
import { Apply } from "components/apply/Apply";
import { Partners } from "components/content/Partners";
import { JobDetails } from "components/job-details/JobDetails";
......@@ -23,10 +24,12 @@ import { EMBLHome } from "../components/home/EMBLHome";
import "./App.scss";
import { AppContext, isEBISite, orgName } from "./AppContext";
var history = createBrowserHistory();
export function App() {
return (
<AppContext.Provider value={(isEBISite, orgName)}>
<Router basename="jobs">
<Router history={history} basename="jobs">
<Metadata />
<div className="vf-body">
<Switch>
......@@ -96,3 +99,8 @@ export function App() {
</AppContext.Provider>
);
}
history.listen((location) => {
window.ga("set", "page", location.pathname + location.search);
window.ga("send", "pageview");
});
......@@ -82,10 +82,14 @@ export function Alerts() {
<div className="vf-stack">
<h1 className="vf-intro__heading ">EMBL Job alerts</h1>
<p className="vf-lede">Thank you for subscribing to a job alert!</p>
<p className="vf-lede">
Thank you for subscribing to the EMBL job alerts.
</p>
<p className="vf-intro__text">
We have sent you an email to confirm your subscription.
You should receive a confirmation email shortly. From now on,
you'll be among the first to know about our latest career
opportunities.
</p>
{isEBISite ? (
<a
......
......@@ -14436,6 +14436,11 @@ react-fast-compare@^3.1.1:
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb"
integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==
 
react-ga@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/react-ga/-/react-ga-3.3.0.tgz#c91f407198adcb3b49e2bc5c12b3fe460039b3ca"
integrity sha512-o8RScHj6Lb8cwy3GMrVH6NJvL+y0zpJvKtc0+wmH7Bt23rszJmnqEQxRbyrqUzk9DTJIHoP42bfO5rswC9SWBQ==
react-helmet@6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.1.0.tgz#a750d5165cb13cf213e44747502652e794468726"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment