index.js 458 字节
Newer Older
N
Nicolás Figueroa 已提交
1 2
import * as fbq from '../lib/fpixel'

3
export default function Home() {
N
Nicolás Figueroa 已提交
4 5 6 7
  const handleClick = () => {
    fbq.event('Purchase', { currency: 'USD', value: 10 })
  }

8
  return (
N
Nicolás Figueroa 已提交
9 10 11 12 13 14 15 16 17
    <div>
      <h1>
        Go to `pages/_app.js` to see how you can add Facebook Pixel to your app
      </h1>
      <p>Click the button below to send a purchase event to Pixel</p>
      <button type="button" onClick={handleClick}>
        Buy $10
      </button>
    </div>
18 19
  )
}