{"_id":"57d698404340330e00953c81","version":{"_id":"57d698404340330e00953c6c","project":"564f643f33082f0d001bb714","__v":2,"createdAt":"2016-09-12T11:57:52.437Z","releaseDate":"2016-09-12T11:57:52.437Z","categories":["57d698404340330e00953c6d","57d698404340330e00953c6e","57d698404340330e00953c6f","57d698404340330e00953c70","57d698404340330e00953c71","57d698404340330e00953c72","57d698404340330e00953c73","58a5711c79ac232f00cbadb5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"user":"564f641651f2ec0d001d6998","__v":1,"category":{"_id":"57d698404340330e00953c72","project":"564f643f33082f0d001bb714","version":"57d698404340330e00953c6c","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-10T19:30:55.729Z","from_sync":false,"order":5,"slug":"дополнительные-интеграции","title":"Интеграции DDM"},"parentDoc":null,"project":"564f643f33082f0d001bb714","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-15T09:58:24.805Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"[Digital Data Manager](https://github.com/driveback/digital-data-manager) позвляет реализовать интеграцию [Facebook Pixel](https://www.facebook.com/business/a/facebook-pixel) на ваш сайт в один клик.\n\nИнтеграция автоматически активирует следующие события Facebook Pixel:\n- ViewContent (для карточек товаров и товарных категорий)\n- AddToCart\n- Purchase\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Инициализация\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"ddManager.initialize({\\n\\t\\\"integrations\\\": {\\n    {\\n    \\t\\\"Facebook Pixel\\\": {\\n      \\t\\\"pixelId\\\": \\\"XXX\\\"\\n      }\\n    }\\n  }\\n});\",\n      \"language\": \"javascript\",\n      \"name\": \"JavaScript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Описание опций\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Ключ\",\n    \"h-1\": \"Тип\",\n    \"h-2\": \"Описание\",\n    \"0-0\": \"pixelId\",\n    \"0-1\": \"String\",\n    \"0-2\": \"**Обязательное поле**. Строка из цифр.\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Минимальные настройки Digital Data Layer\"\n}\n[/block]\n**На всех страницах сайта:**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"page\\\": {\\n  \\\"type\\\": \\\"<тип страницы>\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JavaScript\"\n    }\n  ]\n}\n[/block]\n**Страница товарной категории:** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"page\\\": {\\n  \\\"type\\\": \\\"category\\\",\\n  \\\"categoryId\\\": \\\"123\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JavaScript\"\n    }\n  ]\n}\n[/block]\n**Страница карточки товара:** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"page\\\": {\\n  \\t\\\"type\\\": \\\"product\\\"\\n  },\\n  \\\"product\\\": {\\n    \\\"id\\\": \\\"1234567890\\\",\\n    \\\"name\\\": \\\"Ботинки Timberland\\\",\\n    \\\"category\\\": [\\n      \\\"Обувь\\\",\\n      \\\"Ботинки\\\"\\n    ],\\n    \\\"currency\\\": \\\"RUB\\\",\\n    \\\"unitPrice\\\": 12990,\\n    \\\"unitSalePrice\\\": 10990\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JavaScript\"\n    }\n  ]\n}\n[/block]\n**Страница подтверждения заказа:** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"page\\\": {\\n  \\t\\\"type\\\": \\\"confirmation\\\"\\n  },\\n  \\\"transaction\\\": {\\n    \\\"orderId\\\": \\\"123456\\\",\\n    \\\"currency\\\": \\\"RUB\\\",\\n    \\\"total\\\": 26000,\\n    \\\"lineItems\\\": [\\n      {\\n        \\\"product\\\": {\\n          \\\"id\\\": \\\"1234567890\\\",\\n          \\\"name\\\": \\\"Ботинки Timberland\\\",\\n        },\\n        \\\"quantity\\\": 1\\n      },\\n      {\\n        \\\"product\\\": {\\n          \\\"id\\\": \\\"1234567890\\\",\\n          \\\"name\\\": \\\"Ботинки Timberland\\\"\\n        },\\n        \\\"quantity\\\": 2\\n      }\\n    ]\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JavaScript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Отслеживание добавления товара в корзину\"\n}\n[/block]\nРеализуется при помощи семантического события [Added Product](/docs/семантические-события#ecommerce--added-product).","excerpt":"","slug":"facebook-pixel","type":"basic","title":"Facebook Pixel"}
[Digital Data Manager](https://github.com/driveback/digital-data-manager) позвляет реализовать интеграцию [Facebook Pixel](https://www.facebook.com/business/a/facebook-pixel) на ваш сайт в один клик. Интеграция автоматически активирует следующие события Facebook Pixel: - ViewContent (для карточек товаров и товарных категорий) - AddToCart - Purchase [block:api-header] { "type": "basic", "title": "Инициализация" } [/block] [block:code] { "codes": [ { "code": "ddManager.initialize({\n\t\"integrations\": {\n {\n \t\"Facebook Pixel\": {\n \t\"pixelId\": \"XXX\"\n }\n }\n }\n});", "language": "javascript", "name": "JavaScript" } ] } [/block] [block:api-header] { "type": "basic", "title": "Описание опций" } [/block] [block:parameters] { "data": { "h-0": "Ключ", "h-1": "Тип", "h-2": "Описание", "0-0": "pixelId", "0-1": "String", "0-2": "**Обязательное поле**. Строка из цифр." }, "cols": 3, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Минимальные настройки Digital Data Layer" } [/block] **На всех страницах сайта:** [block:code] { "codes": [ { "code": "\"page\": {\n \"type\": \"<тип страницы>\"\n}", "language": "json", "name": "JavaScript" } ] } [/block] **Страница товарной категории:** [block:code] { "codes": [ { "code": "\"page\": {\n \"type\": \"category\",\n \"categoryId\": \"123\"\n}", "language": "json", "name": "JavaScript" } ] } [/block] **Страница карточки товара:** [block:code] { "codes": [ { "code": "{\n\t\"page\": {\n \t\"type\": \"product\"\n },\n \"product\": {\n \"id\": \"1234567890\",\n \"name\": \"Ботинки Timberland\",\n \"category\": [\n \"Обувь\",\n \"Ботинки\"\n ],\n \"currency\": \"RUB\",\n \"unitPrice\": 12990,\n \"unitSalePrice\": 10990\n }\n}", "language": "json", "name": "JavaScript" } ] } [/block] **Страница подтверждения заказа:** [block:code] { "codes": [ { "code": "{\n\t\"page\": {\n \t\"type\": \"confirmation\"\n },\n \"transaction\": {\n \"orderId\": \"123456\",\n \"currency\": \"RUB\",\n \"total\": 26000,\n \"lineItems\": [\n {\n \"product\": {\n \"id\": \"1234567890\",\n \"name\": \"Ботинки Timberland\",\n },\n \"quantity\": 1\n },\n {\n \"product\": {\n \"id\": \"1234567890\",\n \"name\": \"Ботинки Timberland\"\n },\n \"quantity\": 2\n }\n ]\n }\n}", "language": "json", "name": "JavaScript" } ] } [/block] [block:api-header] { "type": "basic", "title": "Отслеживание добавления товара в корзину" } [/block] Реализуется при помощи семантического события [Added Product](/docs/семантические-события#ecommerce--added-product).