How to use the react-ga.set function in react-ga

To help you get started, we’ve selected a few react-ga examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elamperti / OpenWebScrobbler / src / components / AnalyticsListener.js View on Github external
sendPageChange(path, search='') {
    let page = path + search;
    ReactGA.set({page});
    ReactGA.pageview(page);
  }
github Madmous / madClones / client / trello / src / analytics.js View on Github external
export default function logPageView() {
  ReactGA.set({ page: window.location.pathname });
  ReactGA.pageview(window.location.pathname);
}
github pullboard / pullboard / lib / analytics.js View on Github external
export function logPageView() {
  ReactGA.set({ page: window.location.pathname + window.location.search })
  ReactGA.pageview(window.location.pathname + window.location.search)
}
github Raathigesh / wiretap / src / index.js View on Github external
import React from "react";
import ReactDOM from "react-dom";
import ReactGA from "react-ga";
import { ThemeProvider } from "styled-components";
import "./index.css";
import App from "./App";

if (process.env.NODE_ENV === "production") {
  ReactGA.initialize("UA-108352892-1");
  ReactGA.set({ page: window.location.pathname + window.location.search });
  ReactGA.pageview(window.location.pathname + window.location.search);
}

const theme = {
  mainMargin: {
    desktop: "200px",
    tablet: "50px",
    phone: "10px"
  }
};
ReactDOM.render(
  
    
  ,
  document.getElementById("root")
);
github codeforamerica / citybook / src / index.js View on Github external
function logPageView() {
  ReactGA.set({ page: window.location.pathname });
  ReactGA.pageview(window.location.pathname);
}
github go-faast / faast-web / src / app / Root.jsx View on Github external
import { Provider } from 'react-redux'
import { ConnectedRouter } from 'react-router-redux'
import ReduxToastr from 'react-redux-toastr'

import { I18nextProvider } from 'react-i18next'
import { i18nInitialized, languageChanged, namespaceLoaded } from 'Actions/i18n'
import i18n from './i18n'

import App from 'Components/App'
import store from './store'
import history from './history'
import ReactGA from 'react-ga'

ReactGA.initialize('UA-100689193-1')

ReactGA.set({
  dimension1: 'faast'
})

if (!window.faast) window.faast = {}
window.faast.intervals = {
  orderStatus: [],
  txReceipt: []
}

const Root = () => {
  i18n.on('languageChanged', (lng) => {
    store.dispatch(languageChanged(lng))
  })
  i18n.on('loaded', (loaded) => {
    store.dispatch(namespaceLoaded(loaded))
  })
github NUS-ALSET / achievements / src / services / history.js View on Github external
const trackPage = page => {
  GoogleAnalytics.set({
    page
  });
  GoogleAnalytics.pageview(page);
};
github benetech / MathShare / src / redux / userProfile / sagas.js View on Github external
payload,
    }) {
        yield put({
            type: 'UPDATE_USER_PROFILE',
            payload,
        });
        const {
            email,
            name,
        } = payload;
        IntercomAPI('update', {
            user_id: email,
            email,
            name,
        });
        ReactGA.set({
            email,
        });
    });
}
github Icemic / search.bakery.moe / client / src / app.js View on Github external
const trackPage = (page) => {
    ReactGA.set({ page });
    ReactGA.pageview(page);
    window._czc && window._czc.push(["_trackPageview", page]);
  };
github oceanprotocol / commons / client / src / hoc / withTracker.tsx View on Github external
const trackPage = (page: string) => {
        ReactGA.set({ page, ...options })
        ReactGA.pageview(page)
    }