@@ -6,6 +6,7 @@ A type-safe wrapper around the Cloudflare Zaraz Web API.
66
77- Basic types for ` zaraz.track() ` ;
88- Basic types for ` zaraz.set() ` ;
9+ - Basic types for ` zaraz.consent() ` ;
910- Extensive types for ` zaraz.ecommerce() ` ;
1011- Cheks for ` zaraz ` being available in the window.
1112
@@ -17,22 +18,22 @@ Import zaraz and call the desired method. That's it!
1718import { zaraz } from ' zaraz-ts' ;
1819
1920// Track custom events on your website, that might happen in real time.
20- await zaraz .track (" button clicked" , { userId: " ABC-123" , value: 200 })
21+ await zaraz .track (' button clicked' , { userId: ' ABC-123' , value: 200 });
2122```
2223
2324``` ts
2425import { zaraz } from ' zaraz-ts' ;
2526
26- // Make a variable available in all your events without manually setting it
27+ // Make a variable available in all your events without manually setting it
2728// every time you are using zaraz.track().
2829zaraz .set (' user_id' , ' 123456' );
2930```
3031
3132``` ts
3233import { zaraz } from ' zaraz-ts' ;
3334
34- // Track common events of the e-commerce user journey, such as when a user adds
35- // a product to cart, starts the checkout funnel or completes an order.
35+ // Track common events of the e-commerce user journey, such as when a user adds
36+ // a product to cart, starts the checkout funnel or completes an order.
3637await zaraz .ecommerce (' Order Completed' , {
3738 checkout_id: ' 616727740' ,
3839 order_id: ' 817286897056801' ,
@@ -72,7 +73,6 @@ Checkout the official Cloudflare docs for more details: https://developers.cloud
7273This package is maintained and actively used by [ Expatfile.tax] [ expatfile-site ] .
7374The #1 US expat tax e-filing software. 🇺🇸
7475
75-
7676[ build-url ] : https://img.shields.io/github/checks-status/expatfile/zaraz-ts/main
7777[ cov-img ] : https://codecov.io/gh/expatfile/zaraz-ts/branch/main/graph/badge.svg?token=mbGgsweFuP
7878[ cov-url ] : https://codecov.io/gh/expatfile/zaraz-ts
0 commit comments