@@ -7,10 +7,10 @@ Amplitude-Javascript
7
7
8
8
<script type="text/javascript">
9
9
(function(h,a){var f=h.amplitude||{};var b=a.createElement("script");b.type="text/javascript";
10
- b.async=true;b.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-1.1 -min.js";
10
+ b.async=true;b.src="https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-1.2 -min.js";
11
11
var g=a.getElementsByTagName("script")[0];g.parentNode.insertBefore(b,g);
12
12
f._q=[];function e(i){f[i]=function(){f._q.push([i].concat(Array.prototype.slice.call(arguments,0)))}}
13
- var c=["init","logEvent","setUserId","setGlobalUserProperties ","setVersionName","setDomain"];
13
+ var c=["init","logEvent","setUserId","setUserProperties ","setVersionName","setDomain","setGlobalUserProperties "];
14
14
for(var d=0;d<c.length;d++){e(c[d])}h.amplitude=f})(window,document);
15
15
16
16
amplitude.init("YOUR_API_KEY_HERE");
@@ -43,15 +43,15 @@ You can also add the user ID as an argument to the `init` call:
43
43
44
44
You can attach additional data to any event by passing a Javascript object as the second argument to ` logEvent ` :
45
45
46
- var customProperties = {};
47
- customProperties .key = "value";
48
- amplitude.logEvent("EVENT_IDENTIFIER_HERE", customProperties );
46
+ var eventProperties = {};
47
+ eventProperties .key = "value";
48
+ amplitude.logEvent("EVENT_IDENTIFIER_HERE", eventProperties );
49
49
50
- To add properties that are tracked in every event, you can set global properties for a user:
50
+ To add properties that are tracked in every event, you can set properties for a user:
51
51
52
- var globalProperties = {};
53
- globalProperties .key = "value";
54
- amplitude.setGlobalUserProperties(globalProperties );
52
+ var userProperties = {};
53
+ userProperties .key = "value";
54
+ amplitude.setUserProperties(userProperties );
55
55
56
56
# Configuration Options #
57
57
0 commit comments