How to use the react-facebook-pixel.init function in react-facebook-pixel

To help you get started, we’ve selected a few react-facebook-pixel 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 MyBitFoundation / MyBit-Go.website / components / utils / analytics.js View on Github external
export const initPixelConvTrkr = () => {
  ReactPixel.init("146019056346104");
}
github Neufund / ico-transparency-monitor / src / index.js View on Github external
import thunk from 'redux-thunk';
import { Route, Switch, HashRouter } from 'react-router-dom';
import { createStore, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import RPCProvider from './components/RPCProvider';
import MessageBoxModal from './components/modals';
import withTracker from './components/withTracker';
import reducer from './reducers';
import env from './env.json';
import IcosList from './containers/IcosList';
import InnerIcoPage from './containers/InnerIcoPage';
import ICOStatsPage from './containers/ICOStatsPage';
import './assets/css/index.css';
import { IframeCssTweaker } from './components/IframeCssTweaker';

ReactPixel.init(env.fbPixelId);
ReactPixel.pageView();

const root = document.getElementById('root');

const render = (store) => {
  ReactDOM.render(
github cswbrian / district-councils-dashboard / web / src / WithTracker.js View on Github external
throw new Error(
    'Invalid google tracking ID. or set to UA-000000-01 if you dont have any'
  )
}
const fbPixelTrackingID = process.env.REACT_APP_FACEBOOK_TRACKING_ID
if (!fbPixelTrackingID) {
  throw new Error('Invalid facebook pixel tracking ID.')
}
GoogleAnalytics.initialize(trackingId)

const fbPixelAdvancedMatching = {}
const fbPixelOptions = {
  autoConfig: true,
  debug: false,
}
ReactPixel.init(fbPixelTrackingID, fbPixelAdvancedMatching, fbPixelOptions)

const withTracker = (WrappedComponent, options = {}) => {
  const trackPage = page => {
    GoogleAnalytics.set({
      page,
      ...options,
    })
    GoogleAnalytics.pageview(page)

    ReactPixel.pageView()
  }

  const HOC = class extends React.Component {
    componentDidMount() {
      const page = this.props.location.pathname
      trackPage(page)

react-facebook-pixel

Pixel Kit for React

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis