This page offers you different JS codes that you can use in your Screaming Frog crawler. With these codes, you will be able to extract the dataLayer from your pages and the values of certain parameters at specific events during your crawls.
To do this, follow the official Screaming Frog documentation. When incorporating your JS capture code, copy and modify the snippet that best resolves the information you need.
1. Get all dataLayer array
Create a custom extraction fragment in Screaming Frog and incorporate this code to extract all the dataLayer array in each page.
2. Scrape all dataLayer parameters at a specific event
Create a custom extraction fragment in Screaming Frog and incorporate this code to extract the value that the data layer will have at a specific GTM event on all your page views.
3. Scrape a dataLayer parameter at a specific event
Create a custom extraction fragment in Screaming Frog and incorporate this code to extract the value that the dataLayer will have at a specific GTM event on all your pages.