File tree 2 files changed +37
-0
lines changed
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1
1
import "./src/styles/global.css"
2
+ import Amplify from 'aws-amplify' ;
3
+ import { Analytics , AWSKinesisFirehoseProvider } from '@aws-amplify/analytics' ;
4
+ import awsconfig from './src/config' ;
5
+
6
+ export const onRouteUpdate = ( { location, prevLocation } ) => {
7
+ Analytics . record ( {
8
+ data : {
9
+ url : window . location . href ,
10
+ section : location . pathname ,
11
+ previous : prevLocation ? prevLocation . pathname : null
12
+ } ,
13
+ streamName : awsconfig . aws_kinesis_firehose_stream_name
14
+ } , 'AWSKinesisFirehose' )
15
+ }
16
+
17
+ export const onClientEntry = ( ) => {
18
+ Analytics . addPluggable ( new AWSKinesisFirehoseProvider ( ) ) ;
19
+ Amplify . configure ( awsconfig ) ;
20
+
21
+ Analytics . configure ( {
22
+ AWSKinesisFirehose : {
23
+ region : awsconfig . aws_project_region
24
+ }
25
+ } ) ;
26
+ }
Original file line number Diff line number Diff line change
1
+ /* eslint-disable */
2
+
3
+ const awsmobile = {
4
+ "aws_project_region" : "eu-west-1" ,
5
+ "aws_cognito_identity_pool_id" : "eu-west-1:3df3caec-4bb6-4891-b154-ee940c8264b8" ,
6
+ "aws_cognito_region" : "eu-west-1" ,
7
+ "aws_kinesis_firehose_stream_name" : "ClickStreamKinesisFirehose-OGX7PQdrynUo" ,
8
+
9
+ } ;
10
+
11
+
12
+ export default awsmobile ;
You can’t perform that action at this time.
0 commit comments