Skip to content

Commit 2f7fa7b

Browse files
committed
update readme
1 parent 8892973 commit 2f7fa7b

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ Amplitude-Javascript
99

1010
```html
1111
<script type="text/javascript">
12-
(function(e,t){var n=e.amplitude||{_q:[],_iq:{}};var r=t.createElement("script");r.type="text/javascript";
13-
r.async=true;r.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.9.0-min.gz.js";
14-
r.onload=function(){e.amplitude.runQueuedFunctions()};var i=t.getElementsByTagName("script")[0];
15-
i.parentNode.insertBefore(r,i);var s=function(){this._q=[];return this};function a(e){
16-
s.prototype[e]=function(){this._q.push([e].concat(Array.prototype.slice.call(arguments,0)));
17-
return this}}var o=["add","append","clearAll","set","setOnce","unset"];for(var c=0;c<o.length;c++){
18-
a(o[c])}n.Identify=s;var u=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties"];
19-
function l(e){function t(t){e[t]=function(){e._q.push([t].concat(Array.prototype.slice.call(arguments,0)));
20-
}}for(var n=0;n<u.length;n++){t(u[n])}}l(n);n.getInstance=function(e){e=(!e||e.length===0?"$default_instance":e).toLowerCase();
21-
if(!n._iq.hasOwnProperty(e)){n._iq[e]={_q:[]};l(n._iq[e])}return n._iq[e]};e.amplitude=n;
22-
})(window,document);
12+
(function(e,t){var n=e.amplitude||{};var r=t.createElement("script");r.type="text/javascript";
13+
r.async=true;r.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.9.1-min.gz.js";
14+
r.onload=function(){e.amplitude.runQueuedFunctions()};var s=t.getElementsByTagName("script")[0];
15+
s.parentNode.insertBefore(r,s);var i=function(){this._q=[];return this};function o(e){
16+
i.prototype[e]=function(){this._q.push([e].concat(Array.prototype.slice.call(arguments,0)));
17+
return this}}var a=["add","append","clearAll","set","setOnce","unset"];for(var c=0;c<a.length;c++){
18+
o(a[c])}n.Identify=i;n._q=[];function u(e){n[e]=function(){n._q.push([e].concat(Array.prototype.slice.call(arguments,0)));
19+
}}var l=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties"];
20+
for(var p=0;p<l.length;p++){u(l[p])}e.amplitude=n})(window,document);
2321
2422
amplitude.init("YOUR_API_KEY_HERE");
2523
</script>
@@ -363,7 +361,7 @@ If you are using [RequireJS](http://requirejs.org/) to load your Javascript file
363361
```html
364362
<script src='scripts/require.js'></script> <!-- loading RequireJS -->
365363
<script>
366-
require(['https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.9.0-min.gz.js'], function(amplitude) {
364+
require(['https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.9.1-min.gz.js'], function(amplitude) {
367365
amplitude.init('YOUR_API_KEY_HERE'); // replace YOUR_API_KEY_HERE with your Amplitude api key.
368366
window.amplitude = amplitude; // You can bind the amplitude object to window if you want to use it directly.
369367
amplitude.logEvent('Clicked Link A');
@@ -377,7 +375,7 @@ You can also define the path in your RequireJS configuration like so:
377375
<script>
378376
requirejs.config({
379377
paths: {
380-
'amplitude': 'https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.9.0-min.gz'
378+
'amplitude': 'https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.9.1-min.gz'
381379
}
382380
});
383381

0 commit comments

Comments
 (0)