Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit bb17208

Browse files
feat: release the Google Analytics Admin API V1 Beta
PiperOrigin-RevId: 458479633 Source-Link: googleapis/googleapis@6ef569e Source-Link: https://github.com/googleapis/googleapis-gen/commit/e37591034b71728fcd61acd61b0be0caa7625c9e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTM3NTkxMDM0YjcxNzI4ZmNkNjFhY2Q2MWIwYmUwY2FhNzYyNWM5ZSJ9 Source-Link: googleapis/googleapis@ae65014 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b09ede435cce110446d4ab9f62a081b571d37e3f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjA5ZWRlNDM1Y2NlMTEwNDQ2ZDRhYjlmNjJhMDgxYjU3MWQzN2UzZiJ9 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 84cc860 commit bb17208

60 files changed

Lines changed: 56766 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

protos/google/analytics/admin/v1beta/analytics_admin.proto

Lines changed: 1333 additions & 0 deletions
Large diffs are not rendered by default.

protos/google/analytics/admin/v1beta/resources.proto

Lines changed: 905 additions & 0 deletions
Large diffs are not rendered by default.

protos/protos.d.ts

Lines changed: 9094 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.js

Lines changed: 20949 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.json

Lines changed: 2695 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(property, acknowledgement) {
24+
// [START analyticsadmin_v1beta_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_async]
25+
/**
26+
* TODO(developer): Uncomment these variables before running the sample.
27+
*/
28+
/**
29+
* Required. The property for which to acknowledge user data collection.
30+
*/
31+
// const property = 'abc123'
32+
/**
33+
* Required. An acknowledgement that the caller of this method understands the terms
34+
* of user data collection.
35+
* This field must contain the exact value:
36+
* "I acknowledge that I have the necessary privacy disclosures and rights
37+
* from my end users for the collection and processing of their data,
38+
* including the association of such data with the visitation information
39+
* Google Analytics collects from my site and/or app property."
40+
*/
41+
// const acknowledgement = 'abc123'
42+
43+
// Imports the Admin library
44+
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
45+
46+
// Instantiates a client
47+
const adminClient = new AnalyticsAdminServiceClient();
48+
49+
async function callAcknowledgeUserDataCollection() {
50+
// Construct request
51+
const request = {
52+
property,
53+
acknowledgement,
54+
};
55+
56+
// Run request
57+
const response = await adminClient.acknowledgeUserDataCollection(request);
58+
console.log(response);
59+
}
60+
61+
callAcknowledgeUserDataCollection();
62+
// [END analyticsadmin_v1beta_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_async]
63+
}
64+
65+
process.on('unhandledRejection', err => {
66+
console.error(err.message);
67+
process.exitCode = 1;
68+
});
69+
main(...process.argv.slice(2));
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(name) {
24+
// [START analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomDimension_async]
25+
/**
26+
* TODO(developer): Uncomment these variables before running the sample.
27+
*/
28+
/**
29+
* Required. The name of the CustomDimension to archive.
30+
* Example format: properties/1234/customDimensions/5678
31+
*/
32+
// const name = 'abc123'
33+
34+
// Imports the Admin library
35+
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
36+
37+
// Instantiates a client
38+
const adminClient = new AnalyticsAdminServiceClient();
39+
40+
async function callArchiveCustomDimension() {
41+
// Construct request
42+
const request = {
43+
name,
44+
};
45+
46+
// Run request
47+
const response = await adminClient.archiveCustomDimension(request);
48+
console.log(response);
49+
}
50+
51+
callArchiveCustomDimension();
52+
// [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomDimension_async]
53+
}
54+
55+
process.on('unhandledRejection', err => {
56+
console.error(err.message);
57+
process.exitCode = 1;
58+
});
59+
main(...process.argv.slice(2));
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(name) {
24+
// [START analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomMetric_async]
25+
/**
26+
* TODO(developer): Uncomment these variables before running the sample.
27+
*/
28+
/**
29+
* Required. The name of the CustomMetric to archive.
30+
* Example format: properties/1234/customMetrics/5678
31+
*/
32+
// const name = 'abc123'
33+
34+
// Imports the Admin library
35+
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
36+
37+
// Instantiates a client
38+
const adminClient = new AnalyticsAdminServiceClient();
39+
40+
async function callArchiveCustomMetric() {
41+
// Construct request
42+
const request = {
43+
name,
44+
};
45+
46+
// Run request
47+
const response = await adminClient.archiveCustomMetric(request);
48+
console.log(response);
49+
}
50+
51+
callArchiveCustomMetric();
52+
// [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomMetric_async]
53+
}
54+
55+
process.on('unhandledRejection', err => {
56+
console.error(err.message);
57+
process.exitCode = 1;
58+
});
59+
main(...process.argv.slice(2));
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(conversionEvent, parent) {
24+
// [START analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateConversionEvent_async]
25+
/**
26+
* TODO(developer): Uncomment these variables before running the sample.
27+
*/
28+
/**
29+
* Required. The conversion event to create.
30+
*/
31+
// const conversionEvent = {}
32+
/**
33+
* Required. The resource name of the parent property where this conversion event will
34+
* be created. Format: properties/123
35+
*/
36+
// const parent = 'abc123'
37+
38+
// Imports the Admin library
39+
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
40+
41+
// Instantiates a client
42+
const adminClient = new AnalyticsAdminServiceClient();
43+
44+
async function callCreateConversionEvent() {
45+
// Construct request
46+
const request = {
47+
conversionEvent,
48+
parent,
49+
};
50+
51+
// Run request
52+
const response = await adminClient.createConversionEvent(request);
53+
console.log(response);
54+
}
55+
56+
callCreateConversionEvent();
57+
// [END analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateConversionEvent_async]
58+
}
59+
60+
process.on('unhandledRejection', err => {
61+
console.error(err.message);
62+
process.exitCode = 1;
63+
});
64+
main(...process.argv.slice(2));
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(parent, customDimension) {
24+
// [START analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateCustomDimension_async]
25+
/**
26+
* TODO(developer): Uncomment these variables before running the sample.
27+
*/
28+
/**
29+
* Required. Example format: properties/1234
30+
*/
31+
// const parent = 'abc123'
32+
/**
33+
* Required. The CustomDimension to create.
34+
*/
35+
// const customDimension = {}
36+
37+
// Imports the Admin library
38+
const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta;
39+
40+
// Instantiates a client
41+
const adminClient = new AnalyticsAdminServiceClient();
42+
43+
async function callCreateCustomDimension() {
44+
// Construct request
45+
const request = {
46+
parent,
47+
customDimension,
48+
};
49+
50+
// Run request
51+
const response = await adminClient.createCustomDimension(request);
52+
console.log(response);
53+
}
54+
55+
callCreateCustomDimension();
56+
// [END analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateCustomDimension_async]
57+
}
58+
59+
process.on('unhandledRejection', err => {
60+
console.error(err.message);
61+
process.exitCode = 1;
62+
});
63+
main(...process.argv.slice(2));

0 commit comments

Comments
 (0)