IKAUE GA4 Tools and Resources

icon picker
Screaming Frog Scraping DataLayer JS Codes

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.


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.