Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.

Commit c156896

Browse files
committed
Fix casing from abmiguous docs
1 parent 2e61c6b commit c156896

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ GA.prototype.initialize = function() {
121121
siteSpeedSampleRate: opts.siteSpeedSampleRate,
122122
sampleRate: opts.sampleRate,
123123
allowLinker: true,
124-
useAMPclientID: opts.useGoogleAmpClientId
124+
useAmpClientId: opts.useGoogleAmpClientId
125125
};
126126

127127
// set tracker name to avoid collisions with unnamed third party trackers

test/index.test.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ describe('Google Analytics', function() {
131131
analytics.initialize();
132132
analytics.page();
133133

134-
// some workaround for useGoogleAmpClientId as the name passed to GA needed to change to useAMPclientID
134+
// some workaround for useGoogleAmpClientId as the name passed to GA needed to change to useAmpClientId
135135
// but the tests expect the option name to == the parameter passed
136136
var expectedOptsOmitAmp = _.omit(expectedOpts,['useGoogleAmpClientId']);
137-
var gaOptsOmitAmp = _.omit(window.ga.q[0][2],'useAMPclientID');
137+
var gaOptsOmitAmp = _.omit(window.ga.q[0][2],'useAmpClientId');
138138
window.ga.q[0][2] = gaOptsOmitAmp;
139139

140140
analytics.deepEqual(toArray(window.ga.q[0]), ['create', settings.trackingId, expectedOptsOmitAmp]);
@@ -153,17 +153,17 @@ describe('Google Analytics', function() {
153153
analytics.initialize();
154154
analytics.page();
155155

156-
// some workaround for useGoogleAmpClientId as the name passed to GA needed to change to useAMPclientID
156+
// some workaround for useGoogleAmpClientId as the name passed to GA needed to change to useAmpClientId
157157
// but the tests expect the option name to == the parameter passed
158158
var expectedOptsOmitAmp = _.omit(expectedOpts,['useGoogleAmpClientId']);
159-
var gaOptsOmitAmp = _.omit(window.ga.q[0][2],'useAMPclientID');
159+
var gaOptsOmitAmp = _.omit(window.ga.q[0][2],'useAmpClientId');
160160
window.ga.q[0][2] = gaOptsOmitAmp;
161161

162162
analytics.deepEqual(toArray(window.ga.q[0]), ['create', settings.trackingId, expectedOptsOmitAmp]);
163163
});
164164

165165
it('should use AMP Id as the Client Id if the setting is enabled', function() {
166-
ga.options.useAMPclientID = true;
166+
ga.options.useAmpClientId = true;
167167
var expectedOpts = {
168168
cookieDomain: 'none',
169169
useGoogleAmpClientId: true,
@@ -174,10 +174,10 @@ describe('Google Analytics', function() {
174174

175175
analytics.initialize();
176176
analytics.page();
177-
// some workaround for useGoogleAmpClientId as the name passed to GA needed to change to useAMPclientID
177+
// some workaround for useGoogleAmpClientId as the name passed to GA needed to change to uuseAmpClientId
178178
// but the tests expect the option name to == the parameter passed
179179
var expectedOptsOmitAmp = _.omit(expectedOpts,['useGoogleAmpClientId']);
180-
var gaOptsOmitAmp = _.omit(window.ga.q[0][2],'useAMPclientID');
180+
var gaOptsOmitAmp = _.omit(window.ga.q[0][2],'useAmpClientId');
181181
window.ga.q[0][2] = gaOptsOmitAmp;
182182

183183
analytics.deepEqual(toArray(window.ga.q[0]), ['create', settings.trackingId, expectedOptsOmitAmp]);

0 commit comments

Comments
 (0)