Skip to content

Commit 2371afb

Browse files
committed
update snippet tag names
1 parent 5824ec3 commit 2371afb

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

analyticsdata/quickstart.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343
*/
4444
$property_id = 'YOUR-GA4-PROPERTY-ID';
4545

46-
// [START google_analytics_data_initialize]
46+
// [START analyticsdata_initialize]
4747
// Using a default constructor instructs the client to use the credentials
4848
// specified in GOOGLE_APPLICATION_CREDENTIALS environment variable.
4949
$client = new BetaAnalyticsDataClient();
50-
// [END google_analytics_data_initialize]
50+
// [END analyticsdata_initialize]
5151

52-
// [START google_analytics_data_run_report]
52+
// [START analyticsdata_run_report]
5353
// Make an API call.
5454
$response = $client->runReport([
5555
'property' => 'properties/' . $property_id,
@@ -70,15 +70,15 @@
7070
])
7171
]
7272
]);
73-
// [END google_analytics_data_run_report]
73+
// [END analyticsdata_run_report]
7474

75-
// [START google_analytics_data_run_report_response]
75+
// [START analyticsdata_run_report_response]
7676
// Print results of an API call.
7777
print 'Report result: ' . PHP_EOL;
7878

7979
foreach ($response->getRows() as $row) {
8080
print $row->getDimensionValues()[0]->getValue()
8181
. ' ' . $row->getMetricValues()[0]->getValue() . PHP_EOL;
82-
// [END google_analytics_data_run_report_response]
82+
// [END analyticsdata_run_report_response]
8383
}
8484
// [END analytics_data_quickstart]

analyticsdata/quickstart_json_credentials.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
$property_id = 'YOUR-GA4-PROPERTY-ID';
4646

4747

48-
// [START google_analytics_data_initialize]
48+
// [START analyticsdata_json_credentials_initialize]
4949
/* TODO(developer): Replace this variable with a valid path to the
5050
* credentials.json file for your service account downloaded from the
5151
* Cloud Console.
@@ -56,9 +56,9 @@
5656
// the private key file.
5757
$client = new BetaAnalyticsDataClient(['credentials' =>
5858
$credentials_json_path]);
59-
// [END google_analytics_data_initialize]
59+
// [END analyticsdata_json_credentials_initialize]
6060

61-
// [START google_analytics_data_run_report]
61+
// [START analyticsdata_json_credentials_run_report]
6262
// Make an API call.
6363
$response = $client->runReport([
6464
'property' => 'properties/' . $property_id,
@@ -79,16 +79,16 @@
7979
])
8080
]
8181
]);
82-
// [END google_analytics_data_run_report]
82+
// [END analyticsdata_json_credentials_run_report]
8383

84-
// [START google_analytics_data_run_report_response]
84+
// [START analyticsdata_json_credentials_run_report_response]
8585
// Print results of an API call.
8686
print 'Report result: ' . PHP_EOL;
8787

8888
foreach ($response->getRows() as $row) {
8989
print $row->getDimensionValues()[0]->getValue()
9090
. ' ' . $row->getMetricValues()[0]->getValue() . PHP_EOL;
91-
// [END google_analytics_data_run_report_response]
91+
// [END analyticsdata_json_credentials_run_report_response]
9292
}
9393

9494
// [END analytics_data_quickstart]

analyticsdata/quickstart_oauth2/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
// [START analytics_data_quickstart_oauth2]
18+
// [START analyticsdata_quickstart_oauth2]
1919
require 'vendor/autoload.php';
2020

2121
use Google\Analytics\Data\V1beta\BetaAnalyticsDataClient;
@@ -108,4 +108,4 @@
108108
$auth_url = $oauth->buildFullAuthorizationUri();
109109
header('Location: ' . filter_var($auth_url, FILTER_SANITIZE_URL));
110110
}
111-
// [END analytics_data_quickstart_oauth2]
111+
// [END analyticsdata_quickstart_oauth2]

0 commit comments

Comments
 (0)