Skip to content

Commit

Permalink
Fix posthog pageview event (#883)
Browse files Browse the repository at this point in the history
* fix pageview event

* Lint
  • Loading branch information
matheusgr authored Sep 26, 2024
1 parent 50bdd2d commit f2ee2ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion posthog/components/PostHog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const snippet = () => {
// Flags and additional dimentions
const props: Record<string, string> = {};
const trackPageview = () =>
globalThis.window.posthog?.capture("pageview", props);
globalThis.window.posthog?.capture("$pageview", props);
// Attach pushState and popState listeners
const originalPushState = history.pushState;
if (originalPushState) {
Expand Down
4 changes: 2 additions & 2 deletions shopify/loaders/ProductListingPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ export const cacheKey = (props: Props, req: Request): string | null => {
startCursor,
sort,
});

url.searchParams.forEach((value, key) => {
if(!key.startsWith("filter.")) return;
if (!key.startsWith("filter.")) return;

searchParams.append(key, value);
});
Expand Down
1 change: 0 additions & 1 deletion vtex/loaders/product/extend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export interface Props {
* @description Adds brand information to products, useful for Intelligent Search loaders.
*/
brands?: boolean;


products: Product[];
}
Expand Down

0 comments on commit f2ee2ee

Please sign in to comment.