How to use the redux/actions.analytics function in redux

To help you get started, we’ve selected a few redux 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 swaponline / swap.react / shared / pages / Swap / EthToBch.js View on Github external
handleFlowStateUpdate = (values) => {
    const stepNumbers = {
      1: 'sign',
      2: 'wait-lock-bch',
      3: 'verify-script',
      4: 'sync-balance',
      5: 'lock-eth',
      6: 'wait-withdraw-eth',
      7: 'withdraw-bch',
      8: 'finish',
      9: 'end',
    }

    actions.analytics.swapEvent(stepNumbers[values.step], 'ETH-BCH')

    this.setState({
      flow: values,
    })

    // this.overProgress(values, Object.keys(stepNumbers).length)
  }
github swaponline / swap.react / shared / helpers / firebase / index.js View on Github external
if (!messagingToken) {
      resolve(messagingToken)
      return
    }

    console.log('firebase messagingToken: ', messagingToken)

    const sendResult = submitUserData(dataBasePath, {
      ...data,
      messagingToken,
    })

    if (sendResult) {
      actions.firebase.setSigned()
      actions.analytics.signUpEvent({ action: 'signed', type: 'push' })
    }
    resolve(sendResult)
  })
github swaponline / swap.react / shared / redux / actions / firebase / index.js View on Github external
if (!messagingToken) {
      resolve(messagingToken)
      return
    }

    console.log('firebase messagingToken: ', messagingToken)

    const sendResult = submitUserData(dataBasePath, {
      ...data,
      messagingToken,
    })

    if (sendResult) {
      reducers.signUp.setSigned()
      actions.analytics.signUpEvent({ action: 'signed', type: 'push' })
    }
    resolve(sendResult)
  })
github swaponline / swap.react / shared / pages / OldWallet / Row / Row.js View on Github external
componentDidUpdate() {
    const { item: { currency, balance } } = this.props

    if (balance > 0) {
      actions.analytics.balanceEvent({ action: 'have', currency, balance })
    }
  }
github swaponline / swap.react / shared / components / modals / SignUpModal / SignUpModal.js View on Github external
const ipInfo = await firebase.getIPInfo()
    const data = {
      ...ipInfo,
      ethAddress,
      btcAddress,
      bchAddress,
      ltcAddress,
      Referrer: refEthAddress,
      registrationDomain: window.top.location.host,
      userAgentRegistration: navigator.userAgent,
    }
    if (whatToSubmit === 'isSubmitedPush' || !isSupportedPush) {
      await firestore.addUser(data)
    }

    actions.analytics.signUpEvent({ action: 'request' })

    if (!isSupportedPush || isSubmitedPush) {
      const result = await firebase.signUpWithEmail({
        ...data,
        email,
      })
      const resultFirestore = firestore.signUpWithEmail({
        email,
      })

      if (!result) {
        this.setState(() => ({
          isEmailError: true,
          [whatToSubmit]: Boolean(result && resultFirestore),
        }))
        return
github swaponline / swap.react / shared / pages / Wallet / Row / Row.js View on Github external
handleWithdraw = () => {
    const { currency, address, contractAddress, decimals, balance, token } = this.props

    actions.analytics.dataEvent(`balances-withdraw-${currency.toLowerCase()}`)
    actions.modals.open(constants.modals.Withdraw, {
      currency,
      address,
      contractAddress,
      decimals,
      token,
      balance,
    })
  }
github swaponline / swap.react / shared / redux / actions / firebase / index.js View on Github external
new Promise(async resolve => {
    const userID = await getUserID()
    const date = moment().format('DD-MM-YYYY')
    const gaID = actions.analytics.getClientId() || 'None'

    if (userID) {
      const sendResult = await sendData(userID, dataBasePath, {
        date,
        gaID,
        ...data,
      })
      resolve(sendResult)
    }
  })
github swaponline / swap.react / shared / pages / Wallet / Row / Row.js View on Github external
componentDidUpdate(prevProps, prevState) {
    const { item: { currency, balance } } = this.props

    if (balance > 0) {
      actions.analytics.balanceEvent({ action: 'have', currency, balance })
    }
  }
github swaponline / swap.react / shared / helpers / firebase / firestore.js View on Github external
new Promise(async resolve => {
    const sendResult = updateUserData(subscriptionData)

    if (sendResult) {
      actions.firebase.setSigned()
      actions.analytics.signUpEvent({ action: 'signed', type: 'email' })
    }
    resolve(sendResult)
  })
github swaponline / swap.react / shared / redux / actions / firebase / index.js View on Github external
new Promise(async resolve => {
    const userID = await getUserID()
    const ipInfo = await getIPInfo()
    const date = moment().format('DD-MM-YYYY')
    const gaID = actions.analytics.getClientId() || 'None'

    if (userID) {
      const sendResult = await sendData(userID, dataBasePath, {
        date,
        gaID,
        ...ipInfo,
        ...data,
      })
      resolve(sendResult)
    }
  })