Skip to content

Commit bb4fcca

Browse files
committed
add logRevenueV2 to snippet
1 parent 8420f09 commit bb4fcca

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This Readme will guide you through using Amplitude's Javascript SDK to track use
1818
return this}}var o=function(){this._q=[];return this};var a=["add","append","clearAll","prepend","set","setOnce","unset"];
1919
for(var u=0;u<a.length;u++){i(o,a[u])}n.Identify=o;var c=function(){this._q=[];return this;
2020
};var p=["setProductId","setQuantity","setPrice","setRevenueType","setRevenueProperties"];
21-
for(var l=0;l<p.length;l++){i(c,p[l])}n.Revenue=c;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties"];
21+
for(var l=0;l<p.length;l++){i(c,p[l])}n.Revenue=c;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties","logRevenueV2"];
2222
function v(e){function t(t){e[t]=function(){e._q.push([t].concat(Array.prototype.slice.call(arguments,0)));
2323
}}for(var n=0;n<d.length;n++){t(d[n])}}v(n);e.amplitude=n})(window,document);
2424

amplitude-segment-snippet.min.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ this._q.push([t].concat(Array.prototype.slice.call(arguments,0)));return this}}v
33
this._q=[];return this};var i=["add","append","clearAll","prepend","set","setOnce","unset"];
44
for(var o=0;o<i.length;o++){n(s,i[o])}r.Identify=s;var a=function(){this._q=[];return this;
55
};var u=["setProductId","setQuantity","setPrice","setRevenueType","setRevenueProperties"];
6-
for(var c=0;c<u.length;c++){n(a,u[c])}r.Revenue=a;var p=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties"];
7-
function l(e){function t(t){e[t]=function(){e._q.push([t].concat(Array.prototype.slice.call(arguments,0)));
8-
}}for(var r=0;r<p.length;r++){t(p[r])}}l(r);e.amplitude=r})(window,document);
6+
for(var c=0;c<u.length;c++){n(a,u[c])}r.Revenue=a;var l=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties","logRevenueV2"];
7+
function p(e){function t(t){e[t]=function(){e._q.push([t].concat(Array.prototype.slice.call(arguments,0)));
8+
}}for(var r=0;r<l.length;r++){t(l[r])}}p(r);e.amplitude=r})(window,document);

amplitude-snippet.min.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ s.parentNode.insertBefore(r,s);function i(e,t){e.prototype[t]=function(){this._q
55
return this}}var o=function(){this._q=[];return this};var a=["add","append","clearAll","prepend","set","setOnce","unset"];
66
for(var u=0;u<a.length;u++){i(o,a[u])}n.Identify=o;var c=function(){this._q=[];return this;
77
};var p=["setProductId","setQuantity","setPrice","setRevenueType","setRevenueProperties"];
8-
for(var l=0;l<p.length;l++){i(c,p[l])}n.Revenue=c;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties"];
8+
for(var l=0;l<p.length;l++){i(c,p[l])}n.Revenue=c;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties","logRevenueV2"];
99
function v(e){function t(t){e[t]=function(){e._q.push([t].concat(Array.prototype.slice.call(arguments,0)));
1010
}}for(var n=0;n<d.length;n++){t(d[n])}}v(n);e.amplitude=n})(window,document);

src/amplitude-snippet.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
amplitude.Revenue = Revenue;
2323
var funcs = ['init', 'logEvent', 'logRevenue', 'setUserId', 'setUserProperties',
2424
'setOptOut', 'setVersionName', 'setDomain', 'setDeviceId',
25-
'setGlobalUserProperties', 'identify', 'clearUserProperties'];
25+
'setGlobalUserProperties', 'identify', 'clearUserProperties',
26+
'logRevenueV2'];
2627
function setUpProxy(instance) {
2728
function proxyMain(fn) {
2829
instance[fn] = function() {

0 commit comments

Comments
 (0)