This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* working shopify analytics * add to cart analytics * workign all events * file renames * file paths * lint * lint * fix nextjs app lint * fix nextjs app lint * test for schemas * lint test * fix nextjs app * add analytic-utils tests and refactor (#117) * add analytic-utils tests and refactor * fix name * fix test * add test for coverage * fix no product payload test * @juanpprieto/fix-failing-tests (#120) * add support for parsing complex gids and fix failing test * shorten cond checks * remove incorrect complex id parsing * fix typo * sendShopifyAnalytics tests * better test naming * lint * some PR feedbacks * more PR feedbacks * lint * more test * more test * better name test * @juanpprieto/cookie util test (#121) * fix lint complains * fix weird ts complain * fix format * clean up constants * convert ShopifyCookie to a hook * ts clean up * ts clean up * more ts clean up * more feedback * update ShopPayButton * make sure monorail endpoint can be updated to the shop domain alternative * mock failed response * add doc * prettier * ci browser different? * return explicit type * see if this works * fix type prettier * fix package path * full cookie test * prettier * move shopify cookie constants back into cart constant * missed a return type * Update .changeset/plenty-moles-listen.md Co-authored-by: Anthony Frehner <frehner@users.noreply.github.com> * remove console log * update exposed methods, constants, and types * prettier * fix file name * fix file name again * Small updates Co-authored-by: Juan P. Prieto <jp@calltheguys.co> Co-authored-by: Anthony Frehner <frehner@users.noreply.github.com>
- Loading branch information
1 parent
2ea046f
commit 16b6b81
Showing
28 changed files
with
2,648 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
'@shopify/storefront-kit-react': patch | ||
--- | ||
|
||
Shopify Analytics | ||
|
||
Methods: | ||
|
||
- `useShopifyCookies(hasUserConsent = true, domain = ''): void` - sets and refreshes Shopify cookies | ||
- `getShopifyCookie(cookieString: string): ShopifyCookie` - returns Shopify cookies | ||
- `sendShopifyAnalytics({eventName: AnalyticsEventName, payload: ShopifyAnalytics}, domain?): Promise<void>` - sends Shopify analytics | ||
- `getClientBrowserParameters(): ClientBrowserParameters` - returns commonly tracked client browser values | ||
|
||
Constants: | ||
|
||
- `AnalyticsEventName` - list of Shopify accepted analytics events | ||
- `AnalyticsPageType` - list of Shopify accepted page type names | ||
- `ShopifyAppSource` - list of Shopify accepted application source | ||
|
||
Types: | ||
|
||
- `ShopifyCookies` | ||
- `ClientBrowserParameters` | ||
- `ShopifyAnalytics` - generic type for `ShopifyPageView` and `ShopifyAddToCart` | ||
- `ShopifyAnalyticsPayload` - generic type for `ShopifyPageViewPayload` and `ShopifyAddToCartPayload` | ||
- `ShopifyPageView` | ||
- `ShopifyPageViewPayload` | ||
- `ShopifyAddToCart` | ||
- `ShopifyAddToCartPayload` | ||
- `ShopifyAnalyticsProduct` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.