usermaven / usermaven-js

Usermaven provides instant actionable analytics to grow your SaaS business.
MIT License
1 stars 2 forks source link

Unencoded characters in url in Next app causes usermaven to crash #54

Open RamlahAziz opened 1 year ago

RamlahAziz commented 1 year ago

When I send a query with the '%' sign in the URL, the app crashes and the error originates from Usermaven.track function image

The website url where you can replicate this behaviour is stage.contentideas.io. type in "90% headshot count" in the search bar in https://stage.contentideas.io/ and it will give the error

seeratawan01 commented 1 year ago

this error is probably from your nextjs implementation, I tried locally with the same payload and It seems like working fine.

usermaven.track("query", {
  query: encodeURIComponent('90% headshot count'),
});

image

@RamlahAziz can look into Jitsu Next App Example. They implemented the provider pattern to initialize the pixel, we can try this.