Skip to content

Commit 3335e2e

Browse files
committed
Enable gzipped library by default.
1 parent f225c76 commit 3335e2e

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Unreleased
22

3+
* Use gzipped version of the library by default. If you still need the uncompressed version, remove ".gz" from the script url in your integration snippet.
34

45
## 2.1.0 (March 23, 2015)
56

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Amplitude-Javascript
99

1010
<script type="text/javascript">
1111
(function(e,t){var r=e.amplitude||{};var n=t.createElement("script");n.type="text/javascript";
12-
n.async=true;n.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.1.0-min.js";
12+
n.async=true;n.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.1.0-min.gz.js";
1313
var s=t.getElementsByTagName("script")[0];s.parentNode.insertBefore(n,s);r._q=[];
14-
function a(e){r[e]=function(){r._q.push([e].concat(Array.prototype.slice.call(arguments,0)))
14+
function a(e){r[e]=function(){r._q.push([e].concat(Array.prototype.slice.call(arguments,0)));
1515
}}var i=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties"];
1616
for(var o=0;o<i.length;o++){a(i[o])}e.amplitude=r})(window,document);
1717

amplitude-snippet.min.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function(e,t){var r=e.amplitude||{};var n=t.createElement("script");n.type="text/javascript";
2-
n.async=true;n.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.1.0-min.js";
2+
n.async=true;n.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.1.0-min.gz.js";
33
var s=t.getElementsByTagName("script")[0];s.parentNode.insertBefore(n,s);r._q=[];
4-
function a(e){r[e]=function(){r._q.push([e].concat(Array.prototype.slice.call(arguments,0)))
4+
function a(e){r[e]=function(){r._q.push([e].concat(Array.prototype.slice.call(arguments,0)));
55
}}var i=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties"];
66
for(var o=0;o<i.length;o++){a(i[o])}e.amplitude=r})(window,document);

amplitude.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/amplitude-snippet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
var as = document.createElement('script');
44
as.type = 'text/javascript';
55
as.async = true;
6-
as.src = 'https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.1.0-min.js';
6+
as.src = 'https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.1.0-min.gz.js';
77
var s = document.getElementsByTagName('script')[0];
88
s.parentNode.insertBefore(as, s);
99
amplitude._q = [];

0 commit comments

Comments
 (0)