4K timelapse of stars and the Milky Way over Lake Tahoe, California.
It's useful to know when you have a new website referrer. Google Analytics is plagued with spam referral and you want to filter this out of reporting as quickly as possible to stop it from skewing your data. It's also helpful to be able to respond quickly to new referral traffic - maybe leave a comment or promote the new link on social media.
The script below will send you a daily email with links to any new referrers.
Choose Advanced Google Services from the Resources menu and switch on the Google Analytics API. Then click the Google API Console link and enable the Google Analytics API there as well.
Finally pick Current project's triggers from the Edit menu and trigger the main function daily at a convenient time.
This script saves known referrers in script properties. For a site with lots of traffic this may run out of space in which case you might need to switch this out and write known referrers to a sheet instead.
More Google Apps Script Projects
- Get an email when your security camera sees something new (Apps Script + Cloud Vision)
- Get an email if your site stops being mobile friendly
- Export Google Fit Daily Steps, Weight and Distance to a Google Sheet
- Animation of a year of Global Cloud Cover
- Control LIFX WiFi light bulbs from Google Apps Script
- How to backup Google Photos to Google Drive automatically after July 2019 with Apps Script
- Using the Todoist API to set a due date on the Alexa integration to-do list (with Apps Script)
- Automate Google PageSpeed Insights and Core Web Vitals Logging with Apps Script
- Using the Azure Monitor REST API from Google Apps Script
- Monitor page index status with Google Sheets, Apps Script and the Google Search Console API
I needed a console app that reads some inputs from an online Excel workbook, does some processing and then writes back the results to a different worksheet. Because I enjoy pain I decided to use the thinly documented new Microsoft.Graph client library. The sample code below assumes that you have a work or education Office 365 subscription.
Paste the code into a new console project and then follow the instructions at the top to add the necessary NuGet packages. You'll also need to register an application at https://portal.azure.com/. You want a Native application and you'll need the Application ID and the redirect URL (just make up some non-routable URL for this). Under Required Permissions for the app you should add read and write files delegated permissions for the Microsoft Graph API.
Hope this saves you a few hours. Comment below if you need a more detailed explanation for any of the above.
(Related: Using the Azure Monitor REST API from Google Apps Script; Monitor page index status with Google Sheets, Apps Script and the Google Search Console API; Automate Google PageSpeed Insights and Core Web Vitals Logging with Apps Script)
I'm switching hosts so there will be various DNS changes and some downtime today.
View of the Pacific from the lighthouse at Point Reyes National Seashore.
Summer starts now (or Winter for the Southern Hemisphere). Rendered in Catfood Earth.
An experimental spherical timelapse of a sunset looking west over the Pacific from West Portal, San Francisco.
In your browser use w, a, s, d to tilt and pan. Best viewed in a VR headset.