diff --git a/website/package.json b/website/package.json index a7ae36d..f6e4edd 100644 --- a/website/package.json +++ b/website/package.json @@ -17,19 +17,20 @@ "@material-ui/core": "^4.12.4", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", - "@nivo/bar": "^0.83.0", + "@nivo/bar": "^0.55.0", "@nivo/core": "^0.83.0", - "@nivo/scatterplot": "^0.83.0", + "@nivo/scatterplot": "^0.55.0", "axios": "^1.4.0", "bootstrap": "^5.3.1", "chart.js": "^4.3.3", "deps": "^1.0.0", - "nivo": "^0.31.0", + "nivo": "^0.2.0", "react": "^18.2.0", "react-bootstrap": "^2.8.0", "react-chartjs-2": "^5.2.0", "react-dom": "^18.2.0", "react-ga": "^3.3.1", + "react-ga4": "^2.1.0", "react-router-dom": "^6.15.0", "recharts": "^2.7.3", "victory": "^36.6.11" diff --git a/website/src/App.tsx b/website/src/App.tsx index 1bcbf35..2ebf02a 100644 --- a/website/src/App.tsx +++ b/website/src/App.tsx @@ -4,9 +4,9 @@ import "./App.css"; import NavBar from "./routes/NavBar"; import Routing from "./routes/Routing"; import { useEffect } from "react"; +import ReactGA4 from "react-ga4"; -const TRACKING_ID = "UA-7794836-7"; // OUR_TRACKING_ID -ReactGA.initialize(TRACKING_ID); +ReactGA4.initialize("G-H40Z0W36GF"); function App() { useEffect(() => { diff --git a/website/src/routes/NavBar.tsx b/website/src/routes/NavBar.tsx index d44b1a6..8b2e796 100644 --- a/website/src/routes/NavBar.tsx +++ b/website/src/routes/NavBar.tsx @@ -2,80 +2,96 @@ import React, { useState } from 'react'; import 'bootstrap/dist/css/bootstrap.css'; import { Link } from 'react-router-dom'; import { useDlLink } from '../views/config'; +import ReactGA from 'react-ga4'; function NavBar() { - // State to manage the toggle status of the navbar - const [isOpen, setIsOpen] = useState(false); - const dlLink = useDlLink(); + const [isOpen, setIsOpen] = useState(false); + const dlLink = useDlLink(); // Assume this hook provides a dynamic download link - // Function to toggle the navbar - const toggle = () => { - setIsOpen(!isOpen); - }; + const toggle = () => { + setIsOpen(!isOpen); + }; - return ( - - ); + +
  • + handleNavLinkClick('Betfair Bot')}> + Betfair Bot + +
  • + + + + ); } export default NavBar; diff --git a/website/src/views/Purchase.tsx b/website/src/views/Purchase.tsx index 1806d10..48a3922 100644 --- a/website/src/views/Purchase.tsx +++ b/website/src/views/Purchase.tsx @@ -5,229 +5,233 @@ import axios from "axios"; import "bootstrap/dist/css/bootstrap.css"; import { useState } from "react"; import { useDlLink } from './config'; +import ReactGA from 'react-ga4'; // Import ReactGA function PaymentCards() { - const [hover, setHover] = useState(false); - const [showBitcoin, setShowBitcoin] = useState(false); - const bitcoinAddress = "bc1q6r0l549jefv3rgs7e0jzsdkx9pq9trd2cqyw50"; - const dlLink = useDlLink(); - const goToLink = (link: string) => { - window.location.href = link; - }; - const handleCopy = () => { - if (!showBitcoin) setShowBitcoin(true); - else setShowBitcoin(false); - }; + const [hover, setHover] = useState(false); + const [showBitcoin, setShowBitcoin] = useState(false); + const bitcoinAddress = "bc1q6r0l549jefv3rgs7e0jzsdkx9pq9trd2cqyw50"; + const dlLink = useDlLink(); + const handleGAEvent = (action, label) => { + // Track event with ReactGA + ReactGA.event({ + category: 'Payment Option', + action: action, + label: label, + }); + }; + const goToLink = (link, paymentType) => { + handleGAEvent('Click', paymentType); // Track which payment option was clicked + window.location.href = link; + }; - return ( - <> -
    -
    -
    -
    - {/*
    */} -
    -
    -
    Free
    -
    Version
    -
    - -
    -
    -
      -
      -
    • Scrape Table and Analyze
    • -
    • Auto Click on best action
    • -
    • Select table templates
    • -
    • Map your own tables
    • -
    • Analyze results
    • -
    • Track payoff
    • -
      -
    • Trial strategies
    • -
      -
    • Get free trial for betfair-bot.com
    • -
    -
    -
    - {/*
    */} -
    -
    -
    -
    -
    -
    Monthly
    -
    $25 / month
    -
    - -
    -
    -
      -
      -
    • Scrape Table and Analyze
    • -
    • Auto Click on best action
    • -
    • Select table templates
    • -
    • Map your own tables
    • -
    • Analyze results
    • -
    • Track payoff
    • -
      + const handleCopy = () => { + handleGAEvent('Click', 'Bitcoin Address Copied'); // Track bitcoin copy event + setShowBitcoin(!showBitcoin); + }; -
    • Support chat
    • -
    • Access to all strategies
    • -
    • Edit strategies
    • -
    • Create custom strategies
    • -
      -
    • Get free licence for betfair-bot.com
    • -
    -
    -
    - {/*
    */} -
    -
    -
    -
    -
    -
    1 year
    -
    $49 / year
    -
    - -
    -
    -
      -
      -
    • Scrape Table and Analyze
    • -
    • Auto Click on best action
    • -
    • Select table templates
    • -
    • Map your own tables
    • -
    • Analyze results
    • -
    • Track payoff
    • -
      + return ( + <> +
      +
      +
      + {/* Free Version Card */} +
      +
      +
      +
      Free
      +
      Version
      +
      + +
      +
      +
        +
        +
      • Scrape Table and Analyze
      • +
      • Auto Click on best action
      • +
      • Select table templates
      • +
      • Map your own tables
      • +
      • Analyze results
      • +
      • Track payoff
      • +
        +
      • Trial strategies
      • +
        +
      • Get free trial for betfair-bot.com
      • +
      +
      +
      +
      +
      -
    • Support chat
    • -
    • Access to all strategies
    • -
    • Edit strategies
    • -
    • Create custom strategies
    • -
      -
    • Get free licence for betfair-bot.com
    • -
    -
    -
    -
    -
    -
    -
    -
    -
    1 year
    -
    $49 / year
    -
    - setHover(false)}> - - - {showBitcoin && ( -
    - Bitcoin address: {bitcoinAddress}
    - Please email me to confirm once you have made a payment: - dickreuter@gmail.com + {/* Monthly Subscription Card */} +
    +
    +
    +
    Monthly
    +
    $25 / month
    +
    + +
    +
    +
      +
      +
    • Scrape Table and Analyze
    • +
    • Auto Click on best action
    • +
    • Select table templates
    • +
    • Map your own tables
    • +
    • Analyze results
    • +
    • Track payoff
    • +
      + +
    • Support chat
    • +
    • Access to all strategies
    • +
    • Edit strategies
    • +
    • Create custom strategies
    • +
      +
    • Get free licence for betfair-bot.com
    • +
    +
    +
    +
    - )} -
    - {/*

    Bitcoin: bc1q6r0l549jefv3rgs7e0jzsdkx9pq9trd2cqyw50
    */} -
    -
      -
      -
    • Scrape Table and Analyze
    • -
    • Auto Click on best action
    • -
    • Select table templates
    • -
    • Map your own tables
    • -
    • Analyze results
    • -
    • Track payoff
    • -
      -
    • Support chat
    • -
    • Access to all strategies
    • -
    • Edit strategies
    • -
    • Create custom strategies
    • -
      -
    • Get free licence for betfair-bot.com
    • -
    -
    -
    -
    -
    -
    -
    -
    -
    Lifetime
    -
    $499 / life
    -
    - -
    -
    -
      -
      -
    • Scrape Table and Analyze
    • -
    • Auto Click on best action
    • -
    • Select table templates
    • -
    • Map your own tables
    • -
    • Analyze results
    • -
    • Track payoff
    • -
      + {/* Yearly Subscription Card */} +
      +
      +
      +
      1 year
      +
      $49 / year
      +
      + +
      +
      +
        +
        +
      • Scrape Table and Analyze
      • +
      • Auto Click on best action
      • +
      • Select table templates
      • +
      • Map your own tables
      • +
      • Analyze results
      • +
      • Track payoff
      • +
        + +
      • Support chat
      • +
      • Access to all strategies
      • +
      • Edit strategies
      • +
      • Create custom strategies
      • +
        +
      • Get free licence for betfair-bot.com
      • +
      +
      +
      +
      +
      -
    • Support chat
    • -
    • Access to all strategies
    • -
    • Edit strategies
    • -
    • Create custom strategies
    • -
      -
    • Get free licence for betfair-bot.com
    • -
    + {/* Bitcoin Payment Card */} +
    +
    +
    +
    Bitcoin
    +
    + setHover(false)}> + + + + + {showBitcoin && ( +
    + Bitcoin address: {bitcoinAddress}
    + Please email me to confirm once you have made a payment: email@example.com +
    + )} +
    +
    +
      +
      +
    • Scrape Table and Analyze
    • +
    • Auto Click on best action
    • +
    • Select table templates
    • +
    • Map your own tables
    • +
    • Analyze results
    • +
    • Track payoff
    • +
      + +
    • Support chat
    • +
    • Access to all strategies
    • +
    • Edit strategies
    • +
    • Create custom strategies
    • +
      +
    • Get free licence for betfair-bot.com
    • +
    +
    +
    +
    +
    + + {/* Lifetime Subscription Card */} +
    +
    +
    +
    Lifetime
    +
    $499 / life
    +
    + +
    +
    +
      +
      +
    • Scrape Table and Analyze
    • +
    • Auto Click on best action
    • +
    • Select table templates
    • +
    • Map your own tables
    • +
    • Analyze results
    • +
    • Track payoff
    • +
      +
    • Support chat
    • +
    • Access to all strategies
    • +
    • Edit strategies
    • +
    • Create custom strategies
    • +
      +
    • Get free licence for betfair-bot.com
    • +
      +
    • Priority support
    • +
      +
    • Early access to new features
    • +
    +
    +
    +
    +
    -
    -
    -
    -
    - - ); -} - -export default PaymentCards; + + ); +}; -function fetchDlLink() { - throw new Error("Function not implemented."); -} +export default PaymentCards; \ No newline at end of file