API references
Both give you the same pet controls and events. Choose the one that matches how your site is built. The React package is published on npm as @petmysite/react.
- JavaScript APIFor any website. Show messages, hide the pet, play animations and handle clicks with window.petMySite.
- React and Next.jsThe @petmysite/react package: one component for your layout, plus typed controls and event hooks.
The API controls a pet that's already on the page. If yours isn't installed yet, start with the install guides.
What the API can do
- Show or hide the pet, for example on checkout pages.
- Show a speech bubble with an optional button that opens a link or runs your code.
- Play one of the pet's animations.
- Respond to clicks, petting and right-clicks, or replace the click action with your own.
It runs in your visitor's browser, so it can't change your PetMySite settings, plan or attribution. Events never include visitor details or page content.
Still stuck?
Email support@petmysite.com with your website address and what you tried. If the pet isn't showing, say which install method you used.