1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Analytics\Resource;
19
20use Google\Service\Analytics\McfData;
21
22/**
23 * The "mcf" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $analyticsService = new Google\Service\Analytics(...);
27 *   $mcf = $analyticsService->mcf;
28 *  </code>
29 */
30class DataMcf extends \Google\Service\Resource
31{
32  /**
33   * Returns Analytics Multi-Channel Funnels data for a view (profile). (mcf.get)
34   *
35   * @param string $ids Unique table ID for retrieving Analytics data. Table ID is
36   * of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
37   * @param string $startDate Start date for fetching Analytics data. Requests can
38   * specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g.,
39   * today, yesterday, or 7daysAgo). The default value is 7daysAgo.
40   * @param string $endDate End date for fetching Analytics data. Requests can
41   * specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g.,
42   * today, yesterday, or 7daysAgo). The default value is 7daysAgo.
43   * @param string $metrics A comma-separated list of Multi-Channel Funnels
44   * metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one
45   * metric must be specified.
46   * @param array $optParams Optional parameters.
47   *
48   * @opt_param string dimensions A comma-separated list of Multi-Channel Funnels
49   * dimensions. E.g., 'mcf:source,mcf:medium'.
50   * @opt_param string filters A comma-separated list of dimension or metric
51   * filters to be applied to the Analytics data.
52   * @opt_param int max-results The maximum number of entries to include in this
53   * feed.
54   * @opt_param string samplingLevel The desired sampling level.
55   * @opt_param string sort A comma-separated list of dimensions or metrics that
56   * determine the sort order for the Analytics data.
57   * @opt_param int start-index An index of the first entity to retrieve. Use this
58   * parameter as a pagination mechanism along with the max-results parameter.
59   * @return McfData
60   */
61  public function get($ids, $startDate, $endDate, $metrics, $optParams = [])
62  {
63    $params = ['ids' => $ids, 'start-date' => $startDate, 'end-date' => $endDate, 'metrics' => $metrics];
64    $params = array_merge($params, $optParams);
65    return $this->call('get', [$params], McfData::class);
66  }
67}
68
69// Adding a class alias for backwards compatibility with the previous class name.
70class_alias(DataMcf::class, 'Google_Service_Analytics_Resource_DataMcf');
71