GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — aws-lambda-powertools-python/docs/javascript/extra.js at develop · kosoul/aws-lambda-powertools-python Expand file tree/ Copy pathextra.jsMore file actions 71 lines (62 loc) · 1.82 KB / Copy pathextra.jsFile metadata and controls71 lines (62 loc) · 1.82 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 const Amplify = window.aws_amplify.Amplify const Analytics = Amplify.Analytics const KinesisFirehoseProvider = window.aws_amplify.AWSKinesisFirehoseProvider const awsconfig = { "aws_project_region": "eu-west-1", "aws_cognito_identity_pool_id": "eu-west-1:3df3caec-4bb6-4891-b154-ee940c8264b8", "aws_cognito_region": "eu-west-1", "aws_kinesis_firehose_stream_name": "ClickStreamKinesisFirehose-OGX7PQdrynUo", }; const RUNTIME = "python" const attachListeners = () => { /* Register handler to log search on blur */ document.addEventListener("DOMContentLoaded", function () { recordPageView({ prevLocation: document.referrer }) if (document.forms.search) { let query = document.forms.search.query query.addEventListener("blur", function () { // If Search result is ever actionable // we should populate `value` if (this.value) { let path = document.location.pathname; console.info(`Search value: ${this.value}`) recordPageView({ searchPattern: this.value }) } }) } }) // Register handler for page sections when browser history is changed window.onpopstate = function (event) { recordPageView({ prevLocation: document.referrer }) }; } const init = () => { Analytics.addPluggable(new KinesisFirehoseProvider()) Amplify.configure(awsconfig); Analytics.configure({ AWSKinesisFirehose: { region: awsconfig.aws_project_region } }) attachListeners() } const recordPageView = ({prevLocation, searchPattern}) => { Analytics.record({ data: { // Do not count page view for search url: searchPattern ? null : window.location.href, section: searchPattern ? null : location.pathname, previous: prevLocation || null, search: searchPattern || null, language: RUNTIME }, streamName: awsconfig.aws_kinesis_firehose_stream_name }, 'AWSKinesisFirehose') } init() |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |