{"id":23654434,"url":"https://github.com/megaads-vn/ga-api-service","last_synced_at":"2025-06-10T11:33:45.878Z","repository":{"id":62526670,"uuid":"242959188","full_name":"megaads-vn/ga-api-service","owner":"megaads-vn","description":"Service get report from google analytic and google ads","archived":false,"fork":false,"pushed_at":"2020-02-27T09:46:27.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-20T05:38:29.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/megaads-vn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-25T09:22:48.000Z","updated_at":"2020-02-27T09:46:03.000Z","dependencies_parsed_at":"2022-11-02T14:30:52.368Z","dependency_job_id":null,"html_url":"https://github.com/megaads-vn/ga-api-service","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megaads-vn%2Fga-api-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megaads-vn%2Fga-api-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megaads-vn%2Fga-api-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megaads-vn%2Fga-api-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/megaads-vn","download_url":"https://codeload.github.com/megaads-vn/ga-api-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megaads-vn%2Fga-api-service/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259067075,"owners_count":22800255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-28T18:59:42.821Z","updated_at":"2025-06-10T11:33:45.677Z","avatar_url":"https://github.com/megaads-vn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n#Installation\nadd in file composer.json\n```\n\"require\": {\n\t\"megaads/ga-service\": \"^1.2\"\n}\n```\n#\n#Get Report From Google Analytic\n```\n$KEY_FILE_LOCATION =  '../config/client-secrets.json';\n$name = 'Chiaki';\n$filter = [\n    'viewId' =\u003e 'xxxxxxxx',\n    'from' =\u003e '2020-02-01',\n    'to' =\u003e '2020-02-25',\n    'metrics' =\u003e [\n       'ga:sessions', 'ga:users', 'ga:bounces'\n    ]\n];\n$gaTransfer = new \\GaServices\\GoogleAnalytic();\n$items = $gaTransfer-\u003ereport($name, $KEY_FILE_LOCATION, $filter);\n```\n\n#Google Ads\n```\n\\\\ Get cost ads of account\n$adsCostAccount = new \\GaServices\\AdsCostAccount();\n$fileConfig = '../config/adsapi_php.ini';\n$customerId = 'xxx-xxx-xxxx';\n$filter = ['from' =\u003e '2020-01-01', 'to' =\u003e '2020-01-29']\n$cost = $adsCostAccount-\u003ereport($customerId, $fileConfig, $filter);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegaads-vn%2Fga-api-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegaads-vn%2Fga-api-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegaads-vn%2Fga-api-service/lists"}