File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,9 +9,11 @@ const awsconfig = {
99 "aws_kinesis_firehose_stream_name" : "ClickStreamKinesisFirehose-OGX7PQdrynUo" ,
1010} ;
1111
12- const RUNTIME = "python"
12+ const RUNTIME = "java"
13+ const BASE_ORIGIN = "awslabs.github.io"
1314
14- const attachListeners = ( ) => {
15+ function enableSearchOnBlurElement ( ) {
16+ if ( document . location . hostname != BASE_ORIGIN ) return // prevent unnecessary data
1517 /* Register handler to log search on blur */
1618 document . addEventListener ( "DOMContentLoaded" , function ( ) {
1719 recordPageView ( {
@@ -23,7 +25,6 @@ const attachListeners = () => {
2325 // If Search result is ever actionable
2426 // we should populate `value`
2527 if ( this . value ) {
26- let path = document . location . pathname ;
2728 console . info ( `Search value: ${ this . value } ` )
2829 recordPageView ( {
2930 searchPattern : this . value
@@ -41,6 +42,10 @@ const attachListeners = () => {
4142 } ;
4243}
4344
45+ const attachListeners = ( ) => {
46+ enableSearchOnBlurElement ( )
47+ }
48+
4449const init = ( ) => {
4550 Analytics . addPluggable ( new KinesisFirehoseProvider ( ) )
4651 Amplify . configure ( awsconfig ) ;
@@ -68,4 +73,4 @@ const recordPageView = ({prevLocation, searchPattern}) => {
6873 } , 'AWSKinesisFirehose' )
6974}
7075
71- init ( )
76+ init ( )
You can’t perform that action at this time.
0 commit comments