Sunlight is a real-time analytics product that tracks JavaScript rendered visits from Googlebot. It enables search marketers to understand which webpages are crawled by Googlebot, and how frequently, to help them make data-driven decisions and debug potential problems.
Our JavaScript, Sunlight.js, sends tracking pings to our server when a visit from Googlebot is detected, which allows you to monitor Googlebot crawl data near-instantly.
Sunlight.js is the tracking tag that powers data collection from Googlebot's JavaScript renderer. The full code is incredibly lightweight, and can be found unminified and in an easily readable form here. The bulk of the work is done from Sunlight the app, which allows Sunlight.js to remain lightweight. It is self-contained and requires no dependancies on any other JavaScript library.
We ask you not to use the unminified version of Sunlight.js linked to above - it's faster for your users to instead use the minified version, as it's an even smaller filesize.
To start using Sunlight on your site, you'll need to sign up for an account and register a website in order to receive your token. You can then add the following code to anywhere on each page of the site (before the closing </body> tag, for example):
<script defer src="https://sunlightmetrics.b-cdn.net/sunlight.min.js"></script>
<script type="text/javascript">
var sunlightCapi = "YOUR-TOKEN";
var _sping = _sping || [];
</script>
Make sure to change "YOUR-TOKEN" with the token provided in your Sunlight account.
Security is a core principle of Sunlight. Data from Sunlight.js is encrypted in transit using SSL. Sunlight's infrastructure is hosted within Amazon's secure data centers utilising Amazon Web Services (AWS) technology. Sunlight makes use of ISO 27001 and FISMA certified data centers managed by Amazon, which have fully redundant power supplies and biometric authentication.
Sunlight.js has been designed to be extremely fast, lightweight and unobtrusive. To do this, it:
Sunlight's tracking tag only stores Googlebot data, and runs a series of checks to ensure it does not store user data (for example, it takes measures to ensure that data from users who have spoofed their user-agent to act as Googlebot are never stored). This means that Sunlight is GDPR compliant.
Data is backed up daily, encrypted and stored in a secure off-site location.