Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.26 KB

README.md

File metadata and controls

42 lines (29 loc) · 1.26 KB

How to Integrate Google Analytics in Typesense

This project was generated with create-instantsearch-app by Algolia.

Get started

To run this project locally, install the dependencies and run the local server:

npm install
npm start

Alternatively, you may use Yarn:

yarn
yarn start

Open http://localhost:3000 to see your app.

Deployment

  1. Get the files needed for deployment with a static server by running this command.

    npm run build
    
  2. The static files will be created in a dist folder

  3. Select dist folder as the directory for deployment

  4. Deploy

    NB: In case you run to a Uncaught ReferenceError: gtag is not defined.

Follow the following steps to solve the error

  1. Check the index.html file generated in the dist folder.

  2. You would see that the gtag() function of the Google Analytics as to change to a(). Hence, the reason for reference error raised in app.js file.

  3. Modify the function name in the app.js file to a or change it in the index.html file in the dist folder

    NB: If you are modifying it in the index.html in the dist folder, know that you will be modifying more than one line.