Preload test (#262)

* Preload test

* Don't prerender analytics

* Version bump
This commit is contained in:
Jake Archibald
2018-11-10 08:20:13 -08:00
committed by GitHub
parent 6870b135b7
commit a1a00f0bfb
3 changed files with 12 additions and 10 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "squoosh",
"version": "0.1.0",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "squoosh",
"version": "1.0.0",
"version": "1.0.1",
"license": "apache-2.0",
"scripts": {
"start": "webpack serve --host 0.0.0.0 --hot",

View File

@@ -13,11 +13,13 @@ if (!('customElements' in self)) {
init();
}
window.ga = window.ga || ((...args) => (ga.q = ga.q || []).push(args));
ga('create', 'UA-128752250-1', 'auto');
ga('set', 'transport', 'beacon');
ga('send', 'pageview');
// Load the GA script
const s = document.createElement('script');
s.src = 'https://www.google-analytics.com/analytics.js';
document.head!.appendChild(s);
if (typeof PRERENDER === 'undefined') {
window.ga = window.ga || ((...args) => (ga.q = ga.q || []).push(args));
ga('create', 'UA-128752250-1', 'auto');
ga('set', 'transport', 'beacon');
ga('send', 'pageview');
// Load the GA script
const s = document.createElement('script');
s.src = 'https://www.google-analytics.com/analytics.js';
document.head!.appendChild(s);
}