track going to checkout page as a conversion for Google ads
This commit is contained in:
parent
64a4ab8c90
commit
3d44c4406d
@ -35,6 +35,7 @@
|
|||||||
"@radix-ui/react-switch": "^1.0.3",
|
"@radix-ui/react-switch": "^1.0.3",
|
||||||
"@radix-ui/react-tabs": "^1.0.4",
|
"@radix-ui/react-tabs": "^1.0.4",
|
||||||
"@stripe/stripe-js": "^2.2.2",
|
"@stripe/stripe-js": "^2.2.2",
|
||||||
|
"@types/gtag.js": "^0.0.20",
|
||||||
"class-variance-authority": "^0.7.0",
|
"class-variance-authority": "^0.7.0",
|
||||||
"classnames": "^2.3.2",
|
"classnames": "^2.3.2",
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
|
|||||||
@ -34,6 +34,13 @@ export default function useStripeCheckout() {
|
|||||||
"POST"
|
"POST"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Track going to checkout page as a conversion
|
||||||
|
gtag("event", "conversion", {
|
||||||
|
send_to: "AW-16649848443/cFfeCP_Xw8QZEPuMooM-",
|
||||||
|
value: 1.0,
|
||||||
|
currency: "USD",
|
||||||
|
});
|
||||||
|
|
||||||
// Redirect to Stripe Checkout
|
// Redirect to Stripe Checkout
|
||||||
const { error } = await stripe.redirectToCheckout({
|
const { error } = await stripe.redirectToCheckout({
|
||||||
sessionId: res.sessionId,
|
sessionId: res.sessionId,
|
||||||
|
|||||||
@ -1950,6 +1950,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/gtag.js@^0.0.20":
|
||||||
|
version "0.0.20"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/gtag.js/-/gtag.js-0.0.20.tgz#e47edabb4ed5ecac90a079275958e6c929d7c08a"
|
||||||
|
integrity sha512-wwAbk3SA2QeU67unN7zPxjEHmPmlXwZXZvQEpbEUQuMCRGgKyE1m6XDuTUA9b6pCGb/GqJmdfMOY5LuDjJSbbg==
|
||||||
|
|
||||||
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
|
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
|
||||||
version "2.0.6"
|
version "2.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7"
|
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user