Skip to content

Instantly share code, notes, and snippets.

@nathanclevenger
Created October 2, 2022 21:07
Show Gist options
  • Save nathanclevenger/c4f88c7500b712215c8ef5a33e4abd0d to your computer and use it in GitHub Desktop.
Save nathanclevenger/c4f88c7500b712215c8ef5a33e4abd0d to your computer and use it in GitHub Desktop.
Analytics Engine
import db from 'https://pkg.do/analytics.engine.do'
const schema = ({domain, dns, ip, geoIp, geoHtml, webServer, hostname, emails, alexa, phone, majestic, discovered}) =>
(req, env) => env.ZONES.writeDataPoint({
indexes: [domain, dns, ip],
blobs: [geoIp, geoHtml, webServer, hostname, emails, phone, discovered],
doubles: [alexa, majestic],
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment