{"id":416989,"date":"2024-06-30T01:17:30","date_gmt":"2024-06-30T01:17:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=416989"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=416989","title":{"rendered":"<span>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 offline-\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0439 \u0432 Campaign Manager 360 (DoubleClick)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0411\u044b\u043b\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043e\u0444\u043b\u0430\u0439\u043d-\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0439 \u0432 <a href=\"https:\/\/marketingplatform.google.com\/about\/campaign-manager-360\/\" rel=\"noopener noreferrer nofollow\">Google Campaign Manager 360<\/a> (\u0434\u0430\u043b\u0435\u0435 <a href=\"https:\/\/campaignmanager.google.com\/\" rel=\"noopener noreferrer nofollow\">GCM<\/a>). \u0422\u043e\u0442 \u0447\u0442\u043e DoubleClick. \u0414\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u0434\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0430\u0440\u0443 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 API \u043e\u0442 Google. \u0420\u0430\u0431\u043e\u0442\u0430 \u0440\u0430\u0441\u0442\u044f\u043d\u0443\u043b\u0430\u0441\u044c \u043d\u0430 3 \u043d\u0435\u0434\u0435\u043b\u0438. \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c, \u0432\u0434\u0440\u0443\u0433 \u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0430\u043a\u043e\u0432\u0430:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0430\u0439\u0442. \u041f\u043e \u0440\u0435\u043a\u043b\u0430\u043c\u0435 \u0438\u043b\u0438 \u043f\u0440\u044f\u043c\u044b\u043c \u0437\u0430\u0445\u043e\u0434\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0412 GCM \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0434 \u0441 frontend-\u0447\u0430\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0435\u0442 \u0437\u0430\u043a\u0430\u0437, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u044f\u0432\u043a\u0443 \u0438\u043b\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0432\u043e\u043d\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p>\u0421 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f offline-\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422.\u0435. \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433 \u0446\u0435\u043b\u0438, \u043e \u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c GCM, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0432 \u043e\u0442\u0447\u0435\u0442\u0430\u0445 \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0435.<\/p>\n<p><strong>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043b\u044e\u0431\u044b\u043c API \u043e\u0442 Google \u043d\u0443\u0436\u0435\u043d \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 <a href=\"https:\/\/console.developers.google.com\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u043d\u0435\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u2013 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2013 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435.<\/p>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b OAuth consent screen \u0438 \u043f\u043e \u0448\u0430\u0433\u0430\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d\u044b<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/055\/f92\/2fe\/055f922fe07ad60a2c7976b01f352c78.JPG\" alt=\"\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c external\" title=\"\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c external\" width=\"719\" height=\"497\"\/><figcaption>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c external<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9dd\/81d\/245\/9dd81d245b2a4c750d8543d8adbe7c77.JPG\" alt=\"\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u044f\" title=\"\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u044f\" width=\"797\" height=\"335\"\/><figcaption>\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u044f<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/06c\/581\/3e6\/06c5813e693b842cc5ccb04b5533fe74.JPG\" alt=\"\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API Campaign Manager 360\" title=\"\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API Campaign Manager 360\" width=\"1851\" height=\"491\"\/><figcaption>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API Campaign Manager 360<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/206\/2fc\/8ee\/2062fc8ee5036d35a9db4093991b3f24.JPG\" alt=\"\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432. \u0421\u0435\u0431\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e.\" title=\"\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432. \u0421\u0435\u0431\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e.\" width=\"1752\" height=\"331\"\/><figcaption>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432. \u0421\u0435\u0431\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e.<\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p>\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0440\u0445\u0443 \u0435\u0441\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0430 \u00abEnable APIs and services\u00bb. \u041d\u0430\u0436\u0430\u0432 \u043d\u0430 \u043d\u0435\u0435, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 API. \u0412 \u043f\u043e\u0438\u0441\u043a\u0435 \u0432\u0431\u0438\u0432\u0430\u0435\u043c \u00abcampaign manager 360 api\u00bb, \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u043f\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443. \u0418 \u0436\u043c\u0435\u043c Enable.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d\u044b<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3ed\/ca9\/c6c\/3edca9c6c7a575038fc96e72eb624a9a.JPG\" alt=\"\u0416\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443\" title=\"\u0416\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443\" width=\"647\" height=\"417\"\/><figcaption>\u0416\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f3\/da7\/2fb\/1f3da72fb40b2ce520c9132e01a64358.JPG\" alt=\"\u0418\u0449\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 API\" title=\"\u0418\u0449\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 API\" width=\"535\" height=\"278\"\/><figcaption>\u0418\u0449\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 API<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e2b\/be9\/6b9\/e2bbe96b9c5a3de3fe83e4031242c6aa.JPG\" alt=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\" title=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\" width=\"577\" height=\"295\"\/><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c<\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b \u00abAPIs and services\u00bb \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u044b \u0434\u043b\u044f OAuth2. \u0416\u043c\u0435\u043c \u00abCreate credentials\u00bb \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u00abOAuth client ID\u00bb. \u0418 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0438\u0442. \u0422\u0438\u043f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e Web application) \u0438 URL \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d\u044b<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/276\/a4a\/aae\/276a4aaaedf666fedcb7f9a1da09441c.JPG\" alt=\"\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f OAuth\" title=\"\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f OAuth\" width=\"833\" height=\"477\"\/><figcaption>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f OAuth<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e4a\/326\/27a\/e4a32627a1d7eb4e4958dc5960ccea62.JPG\" alt=\"\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0438\u043f \u0438 URL \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\" title=\"\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0438\u043f \u0438 URL \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\" width=\"729\" height=\"826\"\/><figcaption>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0438\u043f \u0438 URL \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/figcaption><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b48\/31c\/a1f\/b4831ca1f2d66224ebb243a14e210745.JPG\" alt=\"\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439.\" title=\"\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439.\" width=\"470\" height=\"420\"\/><figcaption>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439.<\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c Client ID \u0438 Client secret.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API, \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 <a href=\"https:\/\/developers.google.com\/doubleclick-advertisers\/libraries\" rel=\"noopener noreferrer nofollow\">\u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/a>. \u0422.\u043a. \u0443 \u043c\u0435\u043d\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430 PHP, \u0431\u0435\u0440\u0443 <a href=\"https:\/\/github.com\/googleapis\/google-api-php-client\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/googleapis\/google-api-php-client<\/a>.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442:<\/p>\n<pre><code class=\"php\">&lt;?php  $client = new \\Google_Client(); $client->setApplicationName('MyApplication'); $client->addScope(\\Google_Service_Dfareporting::DFAREPORTING); $client->addScope(\\Google_Service_Dfareporting::DFATRAFFICKING); $client->addScope(\\Google_Service_Dfareporting::DDMCONVERSIONS); $client->setAccessType('offline'); $client->setAuthConfig([    'client_id'     => $options['googleApi.client_id'],    'client_secret' => $options['googleApi.client_secret'],    'redirect_uris' => $options['googleApi.redirect_uris'], ]);  if (!empty($accessToken)) {    $client->setAccessToken($accessToken); }<\/code><\/pre>\n<p>\u041c\u0430\u0441\u0441\u0438\u0432 <em>$options <\/em>\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 Google.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c URL, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0432\u044b\u0434\u0430\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e.<\/p>\n<pre><code class=\"php\">&lt;?php  $client->createAuthUrl();<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0434\u0430\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0443\u0435\u0442 \u043d\u0430 URL \u0438\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <em>code. <\/em>\u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d (AccessToken).<\/p>\n<pre><code class=\"php\">&lt;?php  $tokenData = $client ->fetchAccessTokenWithAuthCode($code);<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<ul>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d &#8212; AccessToken<\/p>\n<\/li>\n<li>\n<p>\u0422\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u2013 RefreshToken<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u0442\u0430, \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0430\u0434\u043e \u0433\u0434\u0435-\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c.<\/p>\n<p>\u0417\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0436\u0438\u0437\u043d\u0438 \u0442\u043e\u043a\u0435\u043d\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u0442\u0435\u043a\u043b\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0435\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e refresh-\u0442\u043e\u043a\u0435\u043d\u0430.<\/p>\n<pre><code class=\"php\">&lt;?php  $client->refreshToken($refreshToken);<\/code><\/pre>\n<p><strong>\u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/strong><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043b\u0438\u0434\u0430 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439, \u0434\u0443\u043c\u0430\u044e, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 DataLayer.<\/p>\n<pre><code class=\"javascript\">&lt;script>  window.dataLayer = window.dataLayer || [];   function gtag(){dataLayer.push(arguments);}   gtag('set', 'allow_ad_personalization_signals', false);    gtag('js', new Date());     gtag('config', 'DC-[floodlightConfigID]');   gtag('event', 'purchase', {     'allow_custom_scripts': true,     'send_to': 'DC-[floodlightConfigID]\/[activityGroupTagString]\/[activityTagString]+[countingMethod]',     'dc_custom_params': {       'match_id':[your_match_id],     }   }); &lt;\/script><\/code><\/pre>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u2013 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u0432 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<pre><code class=\"xml\">&lt;img       src=\"https:\/\/ad.doubleclick.net\/ddm\/activity\/src=[floodlightConfigID];           type=[activityGroupTagString];cat=[activityTagString];           match_id=[your_match_id]\"       width=\"1\" height=\"1\" alt=\"\"\/><\/code><\/pre>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u0438\u0434\u043e\u0432 \u0441 \u0444\u0440\u043e\u043d\u0442\u0430 \u0438 \u043e\u0444\u043b\u0430\u0439\u043d-\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0439. \u041f\u0440\u043e \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/developers.google.com\/doubleclick-advertisers\/guides\/conversions_upload#configure_conversion_resources\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 ID, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <em>match_id<\/em>. \u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e <em>id <\/em>\u0441\u0435\u0441\u0441\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0435\u043c. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c <em>id<\/em> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p><strong>\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/strong><\/p>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c offline-\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0446\u0435\u043b\u0438. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u0437\u0430\u044f\u0432\u043a\u0443, \u043f\u043e\u0437\u0432\u043e\u043d\u0438\u043b, \u043e\u0444\u043e\u0440\u043c\u0438\u043b \u0437\u0430\u043a\u0430\u0437 \u0438 \u0442.\u0434.<\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0439 \u0436\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"php\">&lt;?php  $service = new \\Google_Service_Dfareporting($client); $currentTimeInMicros = time() * 1000 * 1000;  $activity = $service->floodlightActivities->get(    $profileId,    $floodlightActivityId );  $floodlightConfigId = $activity->getFloodlightConfigurationId();  $conversion = new \\Google_Service_Dfareporting_Conversion(); $conversion->setMatchId($matchId); $conversion->setFloodlightActivityId($floodlightActivityId); $conversion->setFloodlightConfigurationId($floodlightConfigId); $conversion->setOrdinal($currentTimeInMicros); $conversion->setTimestampMicros($currentTimeInMicros);<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<ul>\n<li>\n<p><em>$profileId<\/em> \u2013 ID \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/055\/574\/79e\/05557479e02c931834e537eba85ea033.JPG\" width=\"365\" height=\"450\"\/><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<ul>\n<li>\n<p><em>$floodlightActivityId<\/em><\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f9a\/fec\/66c\/f9afec66c2e979e783b9a2c439028222.JPG\" width=\"779\" height=\"520\"\/><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<ul>\n<li>\n<p><em>$matchId<\/em> \u2013 ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\/ID \u0441\u0435\u0441\u0441\u0438\u0438. \u0422\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438 \u0441 \u0444\u0440\u043e\u043d\u0442\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <em>u1&#8230;uN<\/em> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043d\u0435\u0442. \u041f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a:<\/p>\n<pre><code class=\"php\">&lt;?php  $customVariable = new CustomFloodlightVariable(); $customVariable->setKind('dfareporting#customFloodlightVariable'); $customVariable->setType('u1'); \/\/ u2\u2026uN $customVariable->setValue('\u0421\u0443\u043f\u0435\u0440 \u043a\u0430\u043c\u043f\u0430\u043d\u0438\u044f');  $conversion->setCustomVariables([$customVariables]); $batch = new \\Google_Service_Dfareporting_ConversionsBatchInsertRequest(); $batch->setConversions($conversions);  $result = $service->conversions->batchinsert(    $profileId,    $batch );<\/code><\/pre>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e \u0438 \u0432\u0441\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e. \u041d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0435 \u0443\u0432\u0438\u0434\u0435\u043b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u043b\u0438\u0434\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f GCM-\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0437\u0430 15-20 \u043c\u0438\u043d\u0443\u0442. \u041f\u043e\u043a\u0430 \u043b\u0438\u0434 \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d, \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. \u041f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 GCM \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0442 \u0438 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u044d\u0442\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/586358\/\"> https:\/\/habr.com\/ru\/articles\/586358\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0411\u044b\u043b\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043e\u0444\u043b\u0430\u0439\u043d-\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0439 \u0432 <a href=\"https:\/\/marketingplatform.google.com\/about\/campaign-manager-360\/\" rel=\"noopener noreferrer nofollow\">Google Campaign Manager 360<\/a> (\u0434\u0430\u043b\u0435\u0435 <a href=\"https:\/\/campaignmanager.google.com\/\" rel=\"noopener noreferrer nofollow\">GCM<\/a>). \u0422\u043e\u0442 \u0447\u0442\u043e DoubleClick. \u0414\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u0434\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0430\u0440\u0443 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 API \u043e\u0442 Google. \u0420\u0430\u0431\u043e\u0442\u0430 \u0440\u0430\u0441\u0442\u044f\u043d\u0443\u043b\u0430\u0441\u044c \u043d\u0430 3 \u043d\u0435\u0434\u0435\u043b\u0438. \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c, \u0432\u0434\u0440\u0443\u0433 \u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0430\u043a\u043e\u0432\u0430:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0430\u0439\u0442. \u041f\u043e \u0440\u0435\u043a\u043b\u0430\u043c\u0435 \u0438\u043b\u0438 \u043f\u0440\u044f\u043c\u044b\u043c \u0437\u0430\u0445\u043e\u0434\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0412 GCM \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0434 \u0441 frontend-\u0447\u0430\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0435\u0442 \u0437\u0430\u043a\u0430\u0437, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u044f\u0432\u043a\u0443 \u0438\u043b\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0432\u043e\u043d\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p>\u0421 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f offline-\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422.\u0435. \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433 \u0446\u0435\u043b\u0438, \u043e \u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c GCM, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0432 \u043e\u0442\u0447\u0435\u0442\u0430\u0445 \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0435.<\/p>\n<p><strong>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043b\u044e\u0431\u044b\u043c API \u043e\u0442 Google \u043d\u0443\u0436\u0435\u043d \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 <a href=\"https:\/\/console.developers.google.com\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u043d\u0435\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u2013 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2013 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435.<\/p>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b OAuth consent screen \u0438 \u043f\u043e \u0448\u0430\u0433\u0430\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d\u044b<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><figcaption>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c external<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u044f<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API Campaign Manager 360<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432. \u0421\u0435\u0431\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e.<\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p>\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0440\u0445\u0443 \u0435\u0441\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0430 \u00abEnable APIs and services\u00bb. \u041d\u0430\u0436\u0430\u0432 \u043d\u0430 \u043d\u0435\u0435, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 API. \u0412 \u043f\u043e\u0438\u0441\u043a\u0435 \u0432\u0431\u0438\u0432\u0430\u0435\u043c \u00abcampaign manager 360 api\u00bb, \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u043f\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443. \u0418 \u0436\u043c\u0435\u043c Enable.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d\u044b<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><figcaption>\u0416\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0418\u0449\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 API<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c<\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b \u00abAPIs and services\u00bb \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u044b \u0434\u043b\u044f OAuth2. \u0416\u043c\u0435\u043c \u00abCreate credentials\u00bb \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u00abOAuth client ID\u00bb. \u0418 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0438\u0442. \u0422\u0438\u043f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e Web application) \u0438 URL \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d\u044b<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><figcaption>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f OAuth<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0438\u043f \u0438 URL \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/figcaption><\/figure>\n<figure class=\"\"><figcaption>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439.<\/figcaption><\/figure>\n<\/div>\n<\/details>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c Client ID \u0438 Client secret.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API, \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 <a href=\"https:\/\/developers.google.com\/doubleclick-advertisers\/libraries\" rel=\"noopener noreferrer nofollow\">\u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/a>. \u0422.\u043a. \u0443 \u043c\u0435\u043d\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430 PHP, \u0431\u0435\u0440\u0443 <a href=\"https:\/\/github.com\/googleapis\/google-api-php-client\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/googleapis\/google-api-php-client<\/a>.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442:<\/p>\n<pre><code class=\"php\">&lt;?php  $client = new \\Google_Client(); $client->setApplicationName('MyApplication'); $client->addScope(\\Google_Service_Dfareporting::DFAREPORTING); $client->addScope(\\Google_Service_Dfareporting::DFATRAFFICKING); $client->addScope(\\Google_Service_Dfareporting::DDMCONVERSIONS); $client->setAccessType('offline'); $client->setAuthConfig([    'client_id'     => $options['googleApi.client_id'],    'client_secret' => $options['googleApi.client_secret'],    'redirect_uris' => $options['googleApi.redirect_uris'], ]);  if (!empty($accessToken)) {    $client->setAccessToken($accessToken); }<\/code><\/pre>\n<p>\u041c\u0430\u0441\u0441\u0438\u0432 <em>$options <\/em>\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 Google.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c URL, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0432\u044b\u0434\u0430\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e.<\/p>\n<pre><code class=\"php\">&lt;?php  $client->createAuthUrl();<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0434\u0430\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0443\u0435\u0442 \u043d\u0430 URL \u0438\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <em>code. <\/em>\u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d (AccessToken).<\/p>\n<pre><code class=\"php\">&lt;?php  $tokenData = $client ->fetchAccessTokenWithAuthCode($code);<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<ul>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d &#8212; AccessToken<\/p>\n<\/li>\n<li>\n<p>\u0422\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u2013 RefreshToken<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u0442\u0430, \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0430\u0434\u043e \u0433\u0434\u0435-\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c.<\/p>\n<p>\u0417\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0436\u0438\u0437\u043d\u0438 \u0442\u043e\u043a\u0435\u043d\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u0442\u0435\u043a\u043b\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0435\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e refresh-\u0442\u043e\u043a\u0435\u043d\u0430.<\/p>\n<pre><code class=\"php\">&lt;?php  $client->refreshToken($refreshToken);<\/code><\/pre>\n<p><strong>\u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/strong><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043b\u0438\u0434\u0430 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439, \u0434\u0443\u043c\u0430\u044e, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 DataLayer.<\/p>\n<pre><code class=\"javascript\">&lt;script>  window.dataLayer = window.dataLayer || [];   function gtag(){dataLayer.push(arguments);}   gtag('set', 'allow_ad_personalization_signals', false);    gtag('js', new Date());     gtag('config', 'DC-[floodlightConfigID]');   gtag('event', 'purchase', {     'allow_custom_scripts': true,     'send_to': 'DC-[floodlightConfigID]\/[activityGroupTagString]\/[activityTagString]+[countingMethod]',     'dc_custom_params': {       'match_id':[your_match_id],     }   }); &lt;\/script><\/code><\/pre>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u2013 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u0432 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<pre><code class=\"xml\">&lt;img       src=\"https:\/\/ad.doubleclick.net\/ddm\/activity\/src=[floodlightConfigID];           type=[activityGroupTagString];cat=[activityTagString];           match_id=[your_match_id]\"       width=\"1\" height=\"1\" alt=\"\"\/><\/code><\/pre>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u0438\u0434\u043e\u0432 \u0441 \u0444\u0440\u043e\u043d\u0442\u0430 \u0438 \u043e\u0444\u043b\u0430\u0439\u043d-\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0439. \u041f\u0440\u043e \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/developers.google.com\/doubleclick-advertisers\/guides\/conversions_upload#configure_conversion_resources\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 ID, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <em>match_id<\/em>. \u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e <em>id <\/em>\u0441\u0435\u0441\u0441\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0435\u043c. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c <em>id<\/em> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p><strong>\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/strong><\/p>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c offline-\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0446\u0435\u043b\u0438. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u0437\u0430\u044f\u0432\u043a\u0443, \u043f\u043e\u0437\u0432\u043e\u043d\u0438\u043b, \u043e\u0444\u043e\u0440\u043c\u0438\u043b \u0437\u0430\u043a\u0430\u0437 \u0438 \u0442.\u0434.<\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0439 \u0436\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"php\">&lt;?php  $service = new \\Google_Service_Dfareporting($client); $currentTimeInMicros = time() * 1000 * 1000;  $activity = $service->floodlightActivities->get(    $profileId,    $floodlightActivityId );  $floodlightConfigId = $activity->getFloodlightConfigurationId();  $conversion = new \\Google_Service_Dfareporting_Conversion(); $conversion->setMatchId($matchId); $conversion->setFloodlightActivityId($floodlightActivityId); $conversion->setFloodlightConfigurationId($floodlightConfigId); $conversion->setOrdinal($currentTimeInMicros); $conversion->setTimestampMicros($currentTimeInMicros);<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<ul>\n<li>\n<p><em>$profileId<\/em> \u2013 ID \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<ul>\n<li>\n<p><em>$floodlightActivityId<\/em><\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043d<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/details>\n<ul>\n<li>\n<p><em>$matchId<\/em> \u2013 ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\/ID \u0441\u0435\u0441\u0441\u0438\u0438. \u0422\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438 \u0441 \u0444\u0440\u043e\u043d\u0442\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <em>u1&#8230;uN<\/em> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043d\u0435\u0442. \u041f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a:<\/p>\n<pre><code class=\"php\">&lt;?php  $customVariable = new CustomFloodlightVariable(); $customVariable->setKind('dfareporting#customFloodlightVariable'); $customVariable->setType('u1'); \/\/ u2\u2026uN $customVariable->setValue('\u0421\u0443\u043f\u0435\u0440 \u043a\u0430\u043c\u043f\u0430\u043d\u0438\u044f');  $conversion->setCustomVariables([$customVariables]); $batch = new \\Google_Service_Dfareporting_ConversionsBatchInsertRequest(); $batch->setConversions($conversions);  $result = $service->conversions->batchinsert(    $profileId,    $batch );<\/code><\/pre>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e \u0438 \u0432\u0441\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e. \u041d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0435 \u0443\u0432\u0438\u0434\u0435\u043b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u043b\u0438\u0434\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f GCM-\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0437\u0430 15-20 \u043c\u0438\u043d\u0443\u0442. \u041f\u043e\u043a\u0430 \u043b\u0438\u0434 \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d, \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. \u041f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 GCM \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0442 \u0438 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u044d\u0442\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/586358\/\"> https:\/\/habr.com\/ru\/articles\/586358\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-416989","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/416989","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=416989"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/416989\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=416989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=416989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=416989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}