GA4-js is a collection of JavaScript snippets to help automate and standardise small tasks in Google Analytics 4.
We might make a plugin in future, but at the moment the best thing to do is
- Select and copy the entirety of the file you want (descriptions of the files below).
- Create a new bookmark (here's a guide if you need it.)
- Paste the JavaScript into the URL of the bookmarklet
To use your bookmarklet - go to a Google Analytics 4 property and then click the bookmarklet.
Feel free to use this code, and change and improve it as you see fit. However - in general you should be careful about running other people's code in your browser. I have put this together for Aira (here's proof I work there).
We're sharing this publicly and have nothing to gain from being doing anything deceptive here but please check this code in detail to make sure you're comfortable with what it is going to do (you'll see it's only clicking around the page).
This script will ask you to list the different mediums you want to create landing page reports for (separated by commas) then for each item it will create a landing page report and name it appropriately.