Giter Site home page Giter Site logo

Comments (17)

jehna avatar jehna commented on June 20, 2024

Hey, thanks for the bug report! Can you paste the error here?

from ga-lite.

jehna avatar jehna commented on June 20, 2024

Ah, it was the one in the title I assume

from ga-lite.

jehna avatar jehna commented on June 20, 2024

Is the site public?

Can you make sure the .js file is served correctly by visiting the direct url?

"Unexpected token <" refers usually to a 404 HTML page being served instead of the correct js file

from ga-lite.

frank6tg avatar frank6tg commented on June 20, 2024

from ga-lite.

frank6tg avatar frank6tg commented on June 20, 2024

from ga-lite.

jehna avatar jehna commented on June 20, 2024

Yep, .js URL seems to serve a HTML page:
https://wptechguru.com/ga-lite.min.js

So can you check that you have uploaded the file to correct place and that your CDN cache is cleared, routes configured correctly etc.

Somehow you should get the URL to return the correct ga-lite.min.js file :)

from ga-lite.

frank6tg avatar frank6tg commented on June 20, 2024

from ga-lite.

jehna avatar jehna commented on June 20, 2024

If you're using WordPress, you probably uploaded the ga-lite.min.js file to your server. Did you upload it to the site's root? If so, you probably have an issue in you .htaccess that prevents loading that file directly and you could try uploading it to e.g. your theme folder.
If you uploaded the file to your theme folder, you should use URL like https://wptechguru.com/wp-content/themes/yourtheme/ga-lite.min.js

from ga-lite.

jehna avatar jehna commented on June 20, 2024

And just to be clear: The issue is that https://wptechguru.com/ga-lite.min.js is not the same as https://raw.githubusercontent.com/jehna/ga-lite/master/dist/ga-lite.min.js

from ga-lite.

frank6tg avatar frank6tg commented on June 20, 2024

from ga-lite.

frank6tg avatar frank6tg commented on June 20, 2024

from ga-lite.

frank6tg avatar frank6tg commented on June 20, 2024

from ga-lite.

frank6tg avatar frank6tg commented on June 20, 2024

from ga-lite.

frank6tg avatar frank6tg commented on June 20, 2024

from ga-lite.

jehna avatar jehna commented on June 20, 2024

Ahh, now I think I know what happened. You must have downloaded this page:
https://github.com/jehna/ga-lite/blob/master/dist/ga-lite.min.js (html page that shows the file)
...instead of this:
https://raw.githubusercontent.com/jehna/ga-lite/master/dist/ga-lite.min.js (source file)

In the future you can click the Raw button at the top-right of the page to download the correct file.

from ga-lite.

frank6tg avatar frank6tg commented on June 20, 2024

from ga-lite.

jehna avatar jehna commented on June 20, 2024

No worries, glad we got the lib working :)

from ga-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.