@@ -9,15 +9,15 @@ Amplitude-Javascript
99
1010```
1111<script type="text/javascript">
12- (function(t,e ){var n=t .amplitude||{};var r=e .createElement("script");r.type="text/javascript";
12+ (function(e,t ){var n=e .amplitude||{};var r=t .createElement("script");r.type="text/javascript";
1313 r.async=true;r.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-2.8.0-min.gz.js";
14- r.onload=function(){t .amplitude.runQueuedFunctions()};var s=e .getElementsByTagName("script")[0];
15- s.parentNode.insertBefore(r,s);var i=function(){this._q=[];return this};function o(t ){
16- i.prototype[t ]=function(){this._q.push([t ].concat(Array.prototype.slice.call(arguments,0)));
17- return this}}var a =["add","append","set","setOnce","unset"];for(var u =0;u<a .length;u ++){o(a[u]);
18- }n.Identify=i;n._q=[];function c(t ){n[t ]=function(){n._q.push([t ].concat(Array.prototype.slice.call(arguments,0)));
19- }}var l=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify"];
20- for(var p=0;p<l.length;p++){c (l[p])}t .amplitude=n})(window,document);
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 a(e ){
16+ i.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=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);
2121
2222 amplitude.init("YOUR_API_KEY_HERE");
2323</script>
@@ -142,6 +142,14 @@ var userProperties = {
142142amplitude.setUserProperties(userProperties);
143143` ` `
144144
145+ ### Clearing User Properties ###
146+
147+ You may use ` clearUserProperties` to clear all user properties at once . Note : the result is irreversible!
148+
149+ ` ` ` javascript
150+ amplitude.clearUserProperties();
151+ ` ` `
152+
145153# Tracking Revenue #
146154
147155To track revenue from a user, call
0 commit comments