-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/ga-lite.min.js:7 Uncaught SyntaxError: Unexpected token < #58
Comments
Hey, thanks for the bug report! Can you paste the error here? |
Ah, it was the one in the title I assume |
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 |
Yes. site is public
see https://wptechguru.com/
the file is here https://wptechguru.com/ga-lite.min.js
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
…On Mon, Apr 23, 2018 at 10:56 AM, Jesse Luoto ***@***.***> wrote:
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
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#58 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADqCK_LtEzApmQQTs_F-f8fec4D5KTJVks5treuIgaJpZM4TgC5L>
.
|
this is how I'm loading it
<script>
(function(e,t,n,i,s,a,c){e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)}
;a=t.createElement(i);c=t.getElementsByTagName(i)[0];a.async=true;a.src=s
;c.parentNode.insertBefore(a,c)
})(window,document,"galite","script","/ga-lite.min.js");
galite('create', 'UA-10342436-33', 'auto');
galite('send', 'pageview');
</script>
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
On Mon, Apr 23, 2018 at 10:57 AM, Frank Gomez <franksdesigns@gmail.com>
wrote:
… Yes. site is public
see https://wptechguru.com/
the file is here https://wptechguru.com/ga-lite.min.js
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
On Mon, Apr 23, 2018 at 10:56 AM, Jesse Luoto ***@***.***>
wrote:
> 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
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#58 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/ADqCK_LtEzApmQQTs_F-f8fec4D5KTJVks5treuIgaJpZM4TgC5L>
> .
>
|
Yep, .js URL seems to serve a HTML page: 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 :) |
I don't have a CDN. I use WP Rocket
I haven't changed anything on this site recently except replace the ga-lite
file because I saw this error .
I'm loading this in the theme "footer scripts" section.
I do have settings in WP Rocket that pre-fetch DNS
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
…On Mon, Apr 23, 2018 at 11:03 AM, Jesse Luoto ***@***.***> wrote:
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 :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#58 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADqCK9HBhP15Z-jNpE_HAjEZ3vqGwZ2gks5tre02gaJpZM4TgC5L>
.
|
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. |
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 |
Yes it is in the root. Good idea.
Tried uploading to theme file ( no child theme on this site ) I wanted my
personal site to be extremly lean.
Same error
even though it is here
https://wptechguru.com/wp-content/themes/bloxtheme/ga-lite.min.js
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
…On Mon, Apr 23, 2018 at 11:17 AM, Jesse Luoto ***@***.***> wrote:
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/your theme/ga-lite.min.js
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#58 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADqCK5Ximopai54hyCj_wrY3xLurtZ88ks5trfCPgaJpZM4TgC5L>
.
|
I just downloaded again today but from here
https://github.com/jehna/ga-lite/tree/master/dist
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
…On Mon, Apr 23, 2018 at 11:26 AM, Jesse Luoto ***@***.***> wrote:
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
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#58 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADqCK2xUjg3Qk3w6me2hcWlFZYR_R5jeks5trfKjgaJpZM4TgC5L>
.
|
Ok, that was it. Thank yoU!
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
On Mon, Apr 23, 2018 at 11:31 AM, Frank Gomez <franksdesigns@gmail.com>
wrote:
… I just downloaded again today but from here https://github.com/jehna/
ga-lite/tree/master/dist
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
On Mon, Apr 23, 2018 at 11:26 AM, Jesse Luoto ***@***.***>
wrote:
> 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
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#58 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/ADqCK2xUjg3Qk3w6me2hcWlFZYR_R5jeks5trfKjgaJpZM4TgC5L>
> .
>
|
also works in root folder which is nice.
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
On Mon, Apr 23, 2018 at 11:38 AM, Frank Gomez <franksdesigns@gmail.com>
wrote:
… Ok, that was it. Thank yoU!
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
On Mon, Apr 23, 2018 at 11:31 AM, Frank Gomez ***@***.***>
wrote:
> I just downloaded again today but from here https://github.com/jehna/
> ga-lite/tree/master/dist
>
>
> Respectfully.
>
> Frank Gomez
> 941-374-7711
> Owner / Creative Director
> Empowered Marketing, LLC dba Frank's Designs
> Empowered Marketing™
> <http://www.franksdesigns.com/>www.FranksDesigns.com
> <http://www.franksdesigns.com/>
> www.WPTechGuru.com
>
>
> On Mon, Apr 23, 2018 at 11:26 AM, Jesse Luoto ***@***.***>
> wrote:
>
>> 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
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#58 (comment)>, or mute
>> the thread
>> <https://github.com/notifications/unsubscribe-auth/ADqCK2xUjg3Qk3w6me2hcWlFZYR_R5jeks5trfKjgaJpZM4TgC5L>
>> .
>>
>
>
|
So how would I find the right file in the future?
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
On Mon, Apr 23, 2018 at 11:49 AM, Frank Gomez <franksdesigns@gmail.com>
wrote:
… also works in root folder which is nice.
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
On Mon, Apr 23, 2018 at 11:38 AM, Frank Gomez ***@***.***>
wrote:
> Ok, that was it. Thank yoU!
>
>
> Respectfully.
>
> Frank Gomez
> 941-374-7711
> Owner / Creative Director
> Empowered Marketing, LLC dba Frank's Designs
> Empowered Marketing™
> <http://www.franksdesigns.com/>www.FranksDesigns.com
> <http://www.franksdesigns.com/>
> www.WPTechGuru.com
>
>
> On Mon, Apr 23, 2018 at 11:31 AM, Frank Gomez ***@***.***>
> wrote:
>
>> I just downloaded again today but from here https://github.com/jehna/
>> ga-lite/tree/master/dist
>>
>>
>> Respectfully.
>>
>> Frank Gomez
>> 941-374-7711
>> Owner / Creative Director
>> Empowered Marketing, LLC dba Frank's Designs
>> Empowered Marketing™
>> <http://www.franksdesigns.com/>www.FranksDesigns.com
>> <http://www.franksdesigns.com/>
>> www.WPTechGuru.com
>>
>>
>> On Mon, Apr 23, 2018 at 11:26 AM, Jesse Luoto ***@***.***>
>> wrote:
>>
>>> 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
>>>
>>> —
>>> You are receiving this because you authored the thread.
>>> Reply to this email directly, view it on GitHub
>>> <#58 (comment)>,
>>> or mute the thread
>>> <https://github.com/notifications/unsubscribe-auth/ADqCK2xUjg3Qk3w6me2hcWlFZYR_R5jeks5trfKjgaJpZM4TgC5L>
>>> .
>>>
>>
>>
>
|
Ahh, now I think I know what happened. You must have downloaded this page: In the future you can click the |
Sorry I'm a GitHub Noob.
Respectfully.
Frank Gomez
941-374-7711
Owner / Creative Director
Empowered Marketing, LLC dba Frank's Designs
Empowered Marketing™
<http://www.franksdesigns.com/>www.FranksDesigns.com
<http://www.franksdesigns.com/>
www.WPTechGuru.com
…On Mon, Apr 23, 2018 at 12:07 PM, Jesse Luoto ***@***.***> wrote:
Closed #58 <#58>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#58 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADqCKzzDtpH60Ymq93jqMImBMUldTJVHks5trfw3gaJpZM4TgC5L>
.
|
No worries, glad we got the lib working :) |
I downloaded the minified js file so i could serve it from my server for performance and I in Google Chrome console reports an error in the syntax. I was unable to determine why this has an error.
The text was updated successfully, but these errors were encountered: