Run your own JavaScript before the screenshot.
Add code that fetches data, adds elements, or changes the page, then capture the result.
-
fetch("/api/stats")
fetch -
document.body.prepend(banner)
modify -
await wait(500)
wait -
Capture the page
result
Your code runs in the page, then the screenshot is taken.
Custom JavaScript for website screenshots
PagePixels Custom JavaScript runs your own code on a web page before the screenshot is taken. Fetch data, add or remove elements, expand sections, dismiss pop-ups, or set up the page state you need, then capture the result as an image.
Custom JavaScript works with scheduling, browser automations, full-page and CSS selector captures, and Real Locations. Add it in the web app, the API, or as a Run JavaScript step inside a browser automation.
Set up the page exactly.
Change the page
Add, remove, or edit elements.
document.querySelector(…)
Running in four steps.
-
Create a screenshot
Paste the page URL.
+ Create Screenshot -
Add your JavaScript
In the JavaScript field.
JavaScript Injection -
Test it
Check the result.
Take Screenshot -
Save
Runs on every capture.
Save Screenshot
Combine it with anything.
-
01
Browser automations
javascript step -
02
Custom CSS
together -
03
Full page
expand first -
04
CSS selector
build an element -
05
Scheduling
every run -
06
Disable JavaScript
opposite option
What people script.
-
Every run
Expand every section
Open accordions before capture.
-
Reports
Add a timestamp
Stamp the time on each capture.
-
Data
Render live numbers
Fetch and show data in the page.
-
Cleanup
Remove pop-ups
Close modals before capture.
Every PagePixels feature works with Custom JavaScript.
-
Where does the code run?
In the page, before the screenshot.
-
Can I wait for my code?
Yes, add a wait step after it.
-
Can I use it mid-flow?
Yes, as a browser automation step.
-
Can I disable the page’s JavaScript instead?
Yes, with Disable JavaScript.
Start free. Upgrade when you’re ready.
Every feature and integration is included on the free plan. No credit card and no phone number required.