Skip to content

Commit f4c0fb1

Browse files
committed
revert amplitude src and tests
1 parent e13ff98 commit f4c0fb1

File tree

10 files changed

+1298
-3473
lines changed

10 files changed

+1298
-3473
lines changed

README.md

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

1010
```html
1111
<script type="text/javascript">
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)));
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 o(e){
16+
s.prototype[e]=function(){this._q.push([e].concat(Array.prototype.slice.call(arguments,0)));
1717
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);
18+
o(a[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);
2123
2224
amplitude.init("YOUR_API_KEY_HERE");
2325
</script>
@@ -279,7 +281,7 @@ You can also pass a callback function to init, which will get called after the S
279281

280282
```javascript
281283
amplitude.init('YOUR_API_KEY_HERE', 'USER_ID_HERE', null, function() {
282-
console.log(amplitude..options.deviceId); // access Amplitude's deviceId after initialization
284+
console.log(amplitude.options.deviceId); // access Amplitude's deviceId after initialization
283285
});
284286
```
285287

amplitude-segment-snippet.min.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(function(e,t){var n=e.amplitude||{_q:[],_iq:{}};var r=function(){this._q=[];return this;
22
};function i(e){r.prototype[e]=function(){this._q.push([e].concat(Array.prototype.slice.call(arguments,0)));
3-
return this}}var s=["add","append","clearAll","set","setOnce","unset"];for(var o=0;o<s.length;o++){
4-
i(s[o])}n.Identify=r;var a=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties"];
3+
return this}}var o=["add","append","clearAll","set","setOnce","unset"];for(var s=0;s<o.length;s++){
4+
i(o[s])}n.Identify=r;var a=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties"];
55
function c(e){function t(t){e[t]=function(){e._q.push([t].concat(Array.prototype.slice.call(arguments,0)));
66
}}for(var n=0;n<a.length;n++){t(a[n])}}c(n);n.getInstance=function(e){e=(!e||e.length===0?"$default_instance":e).toLowerCase();
77
if(!n._iq.hasOwnProperty(e)){n._iq[e]={_q:[]};c(n._iq[e])}return n._iq[e]};e.amplitude=n;

amplitude-snippet.min.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
(function(e,t){var n=e.amplitude||{_q:[],_iq:{}};var r=t.createElement("script");r.type="text/javascript";
22
r.async=true;r.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.9.0-min.gz.js";
33
r.onload=function(){e.amplitude.runQueuedFunctions()};var i=t.getElementsByTagName("script")[0];
4-
i.parentNode.insertBefore(r,i);var s=function(){this._q=[];return this};function a(e){
4+
i.parentNode.insertBefore(r,i);var s=function(){this._q=[];return this};function o(e){
55
s.prototype[e]=function(){this._q.push([e].concat(Array.prototype.slice.call(arguments,0)));
6-
return this}}var o=["add","append","clearAll","set","setOnce","unset"];for(var c=0;c<o.length;c++){
7-
a(o[c])}n.Identify=s;var u=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties"];
6+
return this}}var a=["add","append","clearAll","set","setOnce","unset"];for(var c=0;c<a.length;c++){
7+
o(a[c])}n.Identify=s;var u=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties"];
88
function l(e){function t(t){e[t]=function(){e._q.push([t].concat(Array.prototype.slice.call(arguments,0)));
99
}}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();
1010
if(!n._iq.hasOwnProperty(e)){n._iq[e]={_q:[]};l(n._iq[e])}return n._iq[e]};e.amplitude=n;

0 commit comments

Comments
 (0)