JavaScript Snippets
PayRequest doesn’t have a general-purpose custom JavaScript field (no place to paste in Google Analytics, Meta Pixel, or a custom tracking script that runs on your shop or payment pages). What does exist today is a copy-paste embed snippet for Smart Links, which puts a “buy button” on your own website.If you’re looking for third-party analytics/tracking injection on your PayRequest Page or shop, that isn’t available yet. This page covers the embeddable Smart Link button, which is the closest existing feature.
Embeddable Buy Buttons
Every Smart Link can generate an embed snippet — a small HTML block (a stylesheet link plus a styled<a> button) that you paste into your own website to link straight to that Smart Link’s checkout.
1
Open a Smart Link
Go to Smart Links, and open the one you want to embed.
2
Find the embed section
Scroll to Embed button on your website.
3
Pick a style
Choose between Default, Dark, or Outline button styles.
4
Copy the snippet
Click to copy — it’s a
<link> tag pulling PayRequest’s button stylesheet plus an <a> tag styled as a button, linking to your Smart Link URL.5
Paste it into your site
Drop the snippet into your website’s HTML wherever you want the buy button to appear.
This is a plain HTML link styled as a button — there’s no JavaScript to configure, and nothing to maintain beyond pasting the snippet once. If you change the Smart Link’s price or product later, the embedded button keeps working since it just links to the Smart Link URL.
Tracking Conversions Elsewhere
Since there’s no native pixel/analytics field, two practical options if you need to track conversions from PayRequest payments on your own site or ad platform:- Webhooks: Use the
payment.succeededwebhook to fire your own server-side conversion event when a payment completes. - On-success redirect: Some Smart Link configurations support an on-success action/URL — if yours redirects to a page on your own domain after payment, you can place tracking scripts on that landing page itself.
FAQ
Can I add Google Analytics or a Facebook Pixel to my PayRequest Page?
Can I add Google Analytics or a Facebook Pixel to my PayRequest Page?
Not as a built-in settings field today. The most reliable way to track conversions is the
payment.succeeded webhook, handled server-side.Is the embed snippet just a link, or does it load a script?
Is the embed snippet just a link, or does it load a script?
It’s a stylesheet link plus a plain HTML button/link — no JavaScript executes on your page beyond what your own site already runs.
Next Steps
Smart Links
Create and manage the links you can embed
Webhook Configuration
Track payments server-side instead of client-side