How to use the react-facebook-pixel.track 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 goodjoblife / GoodJobShare / src / components / ShareExperience / InterviewForm / index.js View on Github external
idCounter = idGenerator(
        typeof __idCounterCurrent !== undefined
          ? __idCounterCurrent
          : getMaxId(storedDraft),
      );
    } catch (error) {
      defaultFromDraft = null;
    }
    const defaultState = defaultFromDraft || defaultForm;

    this.setState({
      // eslint-disable-line react/no-did-mount-set-state
      ...defaultState,
    });

    ReactPixel.track('InitiateCheckout', {
      content_category: PIXEL_CONTENT_CATEGORY.VISIT_INTERVIEW_FORM,
    });
  }
github goodjoblife / GoodJobShare / src / components / LaborRightsSingle / index.js View on Github external
componentDidUpdate(prevProps) {
    this.props.queryMenuIfUnfetched();
    this.props.queryEntryIfUnfetched(idSelector(this.props));

    // send Facebook Pixel 'ViewContent' event if goto reading another labor rights unit
    if (idSelector(prevProps) !== idSelector(this.props)) {
      ReactPixel.track('ViewContent', {
        content_ids: [idSelector(this.props)],
        content_category: PIXEL_CONTENT_CATEGORY.VIEW_LABOR_RIGHT,
      });
    }
  }
github goodjoblife / GoodJobShare / src / components / LaborRightsSingle / index.js View on Github external
componentDidMount() {
    this.props.queryMenuIfUnfetched();
    this.props.queryEntryIfUnfetched(idSelector(this.props));
    this.props.fetchPermission();

    // send Facebook Pixel 'ViewContent' event
    ReactPixel.track('ViewContent', {
      content_ids: [this.props.match.params.id],
      content_category: PIXEL_CONTENT_CATEGORY.VIEW_LABOR_RIGHT,
    });
  }
github goodjoblife / GoodJobShare / src / components / ShareExperience / TimeSalaryForm / index.js View on Github external
componentDidMount() {
    const defaultState =
      getDefaultFormFromLocation(this.props.location) ||
      getDefaultFormFromDraft() ||
      defaultForm;

    this.setState({
      // eslint-disable-line react/no-did-mount-set-state
      ...defaultState,
    });

    ReactPixel.track('InitiateCheckout', {
      content_category: PIXEL_CONTENT_CATEGORY.VISIT_TIME_AND_SALARY_FORM,
    });
  }
github goodjoblife / GoodJobShare / src / components / ShareExperience / CampaignTimeAndSalaryForm / index.js View on Github external
response => {
          const count = response.queries_count;

          ReactGA.event({
            category: GA_CATEGORY.SHARE_TIME_SALARY,
            action: GA_ACTION.UPLOAD_SUCCESS,
          });
          ReactPixel.track('Purchase', {
            value: 1,
            currency: 'TWD',
            content_category: PIXEL_CONTENT_CATEGORY.UPLOAD_TIME_AND_SALARY,
          });

          return () => (
             {
                window.location.replace(
                  `/time-and-salary/campaigns/${campaignName}/latest`,
                );
              }}
            />
github goodjoblife / GoodJobShare / src / components / ShareExperience / TimeSalaryForm / index.js View on Github external
response => {
          const count = response.queries_count;

          ReactGA.event({
            category: GA_CATEGORY.SHARE_TIME_SALARY,
            action: GA_ACTION.UPLOAD_SUCCESS,
          });
          ReactPixel.track('Purchase', {
            value: 1,
            currency: 'TWD',
            content_category: PIXEL_CONTENT_CATEGORY.UPLOAD_TIME_AND_SALARY,
          });

          return () => (
             {
                window.location.replace('/salary-work-times/latest');
              }}
            />
          );
        },
github goodjoblife / GoodJobShare / src / components / ShareExperience / CampaignTimeAndSalaryForm / index.js View on Github external
componentDidMount() {
    if (this.props.campaignEntriesStatus === fetchingStatus.FETCHED) {
      this.setCampaignInfoFromEntries(this.props.campaignEntries);
    } else {
      this.props.queryCampaignInfoListIfNeeded();
    }

    ReactPixel.track('InitiateCheckout', {
      content_category: PIXEL_CONTENT_CATEGORY.VISIT_TIME_AND_SALARY_FORM,
    });
  }
github goodjoblife / GoodJobShare / src / components / ShareExperience / InterviewForm / index.js View on Github external
response => {
          const experienceId = response.experience._id;

          ReactGA.event({
            category: GA_CATEGORY.SHARE_INTERVIEW,
            action: GA_ACTION.UPLOAD_SUCCESS,
          });
          ReactPixel.track('Purchase', {
            value: 1,
            currency: 'TWD',
            content_category:
              PIXEL_CONTENT_CATEGORY.UPLOAD_INTERVIEW_EXPERIENCE,
          });
          return () => (
            
                window.location.replace(`/experiences/${experienceId}`)
              }
            />
          );
        },
        error => {
github goodjoblife / GoodJobShare / src / components / TimeAndSalary / SearchBar.js View on Github external
searchText => {
      history.push(`/search?q=${encodeURIComponent(searchText)}`);
      ReactPixel.track('Search', {
        search_string: searchText,
        content_category: PIXEL_CONTENT_CATEGORY.SEARCH_TIME_AND_SALARY,
      });
    },
    [history],
github goodjoblife / GoodJobShare / src / components / ShareExperience / InterviewStepsForm / index.js View on Github external
response => {
          const experienceId = response.experience._id;

          ReactGA.event({
            category: GA_CATEGORY.SHARE_INTERVIEW,
            action: GA_ACTION.UPLOAD_SUCCESS,
          });
          ReactPixel.track('Purchase', {
            value: 1,
            currency: 'TWD',
            content_category:
              PIXEL_CONTENT_CATEGORY.UPLOAD_INTERVIEW_EXPERIENCE,
          });
          return () => (
            
                window.location.replace(`/experiences/${experienceId}`)
              }
            />
          );
        },
        error => {

react-facebook-pixel

Pixel Kit for React

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis