	{"id":937,"date":"2020-06-02T11:49:36","date_gmt":"2020-06-02T03:49:36","guid":{"rendered":"https:\/\/manychat.com.hk\/?post_type=docs&#038;p=937"},"modified":"2020-06-02T11:49:36","modified_gmt":"2020-06-02T03:49:36","password":"","slug":"%e3%80%90%e5%ae%a2%e6%88%b6%e5%88%86%e6%9e%90%e3%80%91manychat%e5%83%8f%e7%b4%a0","status":"publish","type":"docs","link":"https:\/\/manychat.com.hk\/en\/docs\/%e3%80%90%e5%ae%a2%e6%88%b6%e5%88%86%e6%9e%90%e3%80%91manychat%e5%83%8f%e7%b4%a0\/","title":{"rendered":"[Customer analysis] ManyChat pixels"},"content":{"rendered":"<h2 data-identifyelement=\"459\"><strong data-identifyelement=\"468\">Overview<\/strong><\/h2>\n<p data-identifyelement=\"461\">ManyChat Pixel allows you to record website events. You can copy some code strings to your website, set the events you want to track, and then store all the analysis in ManyChat.<\/p>\n<h2 data-identifyelement=\"462\"><strong id=\"howitworks\" data-identifyelement=\"469\"><a href=\"https:\/\/support.manychat.com\/support\/solutions\/articles\/36000207023-manychat-pixel#howitworks\">How it works<\/a><\/strong><\/h2>\n<p data-identifyelement=\"464\">ManyChat performs several steps to make Pixel work properly-it needs to collect data from external sources.<\/p>\n<ol data-identifyelement=\"465\">\n<li data-identifyelement=\"470\">Create a button with an &quot;open site&quot; option to direct your subscribers to external resources.\n<ul data-identifyelement=\"471\">\n<li data-identifyelement=\"472\">From now on, every subscriber clicking this button will implicitly get an additional URL parameter named &quot;mcp_token&quot; (e.g.<code data-identifyelement=\"473\">https:\/\/mysite.com\/?utm_source=manychat&amp;utm_medium=cpa&amp;mcp_token=12312314232yg123jh1g3j1g23u12y3<\/code>). MCP_token stores encrypted metadata to identify the subscriber and its subsequent operations on your website.<\/li>\n<\/ul>\n<\/li>\n<li data-identifyelement=\"474\">Install ManyChat Pixel (guide below). Now, because every page<code data-identifyelement=\"475\"><span data-identifyelement=\"476\">...<\/span><\/code>The block is usually shared between all pages, so you can install the script once on each website-although you are not sure, you can install the script on every page that triggers the event.<\/li>\n<li data-identifyelement=\"477\">Add the logging function to your website and pass it valid expected parameters (guidelines below).<br data-identifyelement=\"478\" \/><strong data-identifyelement=\"479\"><span data-identifyelement=\"480\">important! ! !<\/span>\u00a0 In order for the Pixel to start normally for the first time, you need the user to go from Messenger to the website where the Pixel is located. After completion, the user&#039;s session will be saved for 28 days. During this session, no matter when the user visits the Pixel website, no matter where he\/she comes from, an even number will be triggered.<\/strong><\/li>\n<\/ol>\n<h2 data-identifyelement=\"474\"><strong data-identifyelement=\"481\">Install ManyChat Pixel<\/strong><\/h2>\n<p data-identifyelement=\"476\"><strong data-identifyelement=\"482\"><u data-identifyelement=\"483\">step 1<\/u><\/strong><\/p>\n<p data-identifyelement=\"479\">Go to Automation \u2192 Pixel. You should see a piece of code:<\/p>\n<p data-identifyelement=\"480\"><img decoding=\"async\" class=\"fr-fic fr-fil fr-dib\" src=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36056865775\/original\/-_i1xNReQp60HBgP88u2VNbm-OL2YLrU_A.png?1580233715\" data-id=\"36056865775\" data-identifyelement=\"484\" \/><\/p>\n<p data-identifyelement=\"482\"><strong data-identifyelement=\"485\"><u data-identifyelement=\"486\">Step 2<\/u><\/strong><\/p>\n<p data-identifyelement=\"485\">Copy the ManyChat Pixel code and add it to your website as shown below:<\/p>\n<div data-identifyelement=\"486\">\n<div class=\"prism-show-language\">\n<div class=\"prism-show-language-label\">HTML<\/div>\n<\/div>\n<pre class=\"line-numbers language-html\" contenteditable=\"false\" data-code-brush=\"Html\" data-identifyelement=\"487\"><code class=\"language-html\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>head<span class=\"token punctuation\">&gt;<\/span><\/span>...<span class=\"token comment\" spellcheck=\"true\"><!-- ManyChat --><\/span><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>script <span class=\"token attr-name\">src<\/span><span class=\"token attr-value\"><span class=\"token punctuation\">=<\/span><span class=\"token punctuation\">\"<\/span>\/\/widget.manychat.com\/100949504624148.js<span class=\"token punctuation\">\"<\/span><\/span> <span class=\"token attr-name\">async<\/span><span class=\"token attr-value\"><span class=\"token punctuation\">=<\/span><span class=\"token punctuation\">\"<\/span>async<span class=\"token punctuation\">\"<\/span><\/span><span class=\"token punctuation\">&gt;<\/span><\/span><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>script<span class=\"token punctuation\">&gt;<\/span><\/span><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>head<span class=\"token punctuation\">&gt;<\/span><\/span><\/code><\/pre>\n<p data-identifyelement=\"492\"><span data-identifyelement=\"493\">important hint<\/span>: This part of the content is not available-you should copy one from the ManyChat account.<\/p>\n<\/div>\n<h2 data-identifyelement=\"494\"><strong data-identifyelement=\"494\">Set up events on your website<\/strong><\/h2>\n<p data-identifyelement=\"496\">ManyChat Pixel supports two types of events: Conversion events and Money events. To &quot;trigger&quot; an event, you should use the correct built-in function and pass its expected parameters.<\/p>\n<ol data-identifyelement=\"497\">\n<li data-identifyelement=\"495\"><code data-identifyelement=\"496\"><span data-identifyelement=\"497\">window.MC_PIXEL.fireLogMoneyEvent()<\/span><\/code>\u00a0 Accepts 3 parameters: event name, event weight and currency (you can ignore this parameter-then ManyChat will<code data-identifyelement=\"498\">&#039;USD&#039;<\/code>Used as the default value). The functions to be used will look like this:<code data-identifyelement=\"499\"><span data-identifyelement=\"500\">window.MC_PIXEL.fireLogMoneyEvent('my_book_purchase', 10.7, 'EUR')<\/span><\/code>. Therefore, you will tell ManyChat to record that your subscriber just bought something for 10.7 euros. You can use an existing event name or type in a new event name-in this case, ManyChat will create a new event name.<\/li>\n<li data-identifyelement=\"501\"><code data-identifyelement=\"502\"><span data-identifyelement=\"503\">window.MC_PIXEL.fireLogConversionEvent()<\/span><\/code>The only parameter accepted: the event name. The functions to be used will look like this:<code data-identifyelement=\"504\"><span data-identifyelement=\"505\">window.MC_PIXEL.fireLogConversionEvent('buy_button_clicked')<\/span><\/code>. In this way, ManyChat will know that something has happened on your website-for example, a visitor has clicked certain buttons or links. You can use an existing event name or type in a new event name-in this case, ManyChat will create a new event name.<\/li>\n<\/ol>\n<p data-identifyelement=\"509\"><strong data-identifyelement=\"506\">example<\/strong><\/p>\n<p data-identifyelement=\"511\">Add some events to record! There are two common methods for recording events: when a visitor loads a page (such as &quot;successful payment page&quot;) or clicks a button\/link (such as &quot;read more&quot; or &quot;buy&quot;).<\/p>\n<p data-identifyelement=\"514\"><u data-identifyelement=\"508\">Page load log event complete<\/u><\/p>\n<div data-identifyelement=\"516\">\n<div class=\"prism-show-language\">\n<div class=\"prism-show-language-label\">HTML<\/div>\n<\/div>\n<pre class=\"line-numbers language-html\" contenteditable=\"false\" data-code-brush=\"Html\" data-identifyelement=\"509\"><code class=\"language-html\"><span class=\"token comment\" spellcheck=\"true\"><!-- This syntax will fire event after page is loaded completely --><\/span><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>body <span class=\"token attr-name\">onload<\/span><span class=\"token attr-value\"><span class=\"token punctuation\">=<\/span><span class=\"token punctuation\">\"<\/span>window.MC_PIXEL.fireLogMoneyEvent(<span class=\"token punctuation\">'<\/span>my_book_purchased<span class=\"token punctuation\">'<\/span>, 10.7, <span class=\"token punctuation\">'<\/span>EUR<span class=\"token punctuation\">'<\/span>)<span class=\"token punctuation\">\"<\/span><\/span><span class=\"token punctuation\">&gt;<\/span><\/span>...<span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>body<span class=\"token punctuation\">&gt;<\/span><\/span><\/code><\/pre>\n<p data-identifyelement=\"513\"><br data-identifyelement=\"514\" \/><u data-identifyelement=\"515\">Log events, when visitors click certain buttons or links<\/u><\/p>\n<div data-identifyelement=\"524\">\n<div class=\"prism-show-language\">\n<div class=\"prism-show-language-label\">HTML<\/div>\n<\/div>\n<pre class=\"line-numbers language-html\" contenteditable=\"false\" data-code-brush=\"Html\" data-identifyelement=\"516\"><code class=\"language-html\"><span class=\"token comment\" spellcheck=\"true\"><!-- This syntax will fire event after visitor clicks the button --><\/span><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>button <span class=\"token attr-name\">onclick<\/span><span class=\"token attr-value\"><span class=\"token punctuation\">=<\/span><span class=\"token punctuation\">\"<\/span>window.MC_PIXEL.fireLogConversionEvent(<span class=\"token punctuation\">'<\/span>buy_button_clicked<span class=\"token punctuation\">'<\/span>)<span class=\"token punctuation\">\"<\/span><\/span><span class=\"token punctuation\">&gt;<\/span><\/span>...<span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>button<span class=\"token punctuation\">&gt;<\/span><\/span><span class=\"token comment\" spellcheck=\"true\"><!-- This syntax will fire event after visitor clicks the link --><\/span><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>a <span class=\"token attr-name\">href<\/span><span class=\"token attr-value\"><span class=\"token punctuation\">=<\/span><span class=\"token punctuation\">\"<\/span>#<span class=\"token punctuation\">\"<\/span><\/span> <span class=\"token attr-name\">onclick<\/span><span class=\"token attr-value\"><span class=\"token punctuation\">=<\/span><span class=\"token punctuation\">\"<\/span>window.MC_PIXEL.fireLogConversionEvent(<span class=\"token punctuation\">'<\/span>buy_button_clicked<span class=\"token punctuation\">'<\/span>)<span class=\"token punctuation\">\"<\/span><\/span><span class=\"token punctuation\">&gt;<\/span><\/span>...<span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>a<span class=\"token punctuation\">&gt;<\/span><\/span><\/code><\/pre>\n<p data-identifyelement=\"525\"><br data-identifyelement=\"526\" \/><u data-identifyelement=\"527\">Log several events<\/u><\/p>\n<\/div>\n<\/div>\n<div data-identifyelement=\"537\">\n<div class=\"prism-show-language\">\n<div class=\"prism-show-language-label\">HTML<\/div>\n<\/div>\n<pre class=\"line-numbers language-html\" contenteditable=\"false\" data-code-brush=\"Html\" data-identifyelement=\"528\"><code class=\"language-html\"><span class=\"token comment\" spellcheck=\"true\"><!-- \u6709\u6642\u5019\u60a8\u53ef\u80fd\u9700\u8981\u8a18\u9304\u5e7e\u500b\u4e8b\u4ef6\uff0c\u7576\u67d0\u4e9b\u4e8b\u60c5\u767c\u751f\u6642\uff08\u4f8b\u5982\uff0c\u5c07\u4e8b\u4ef6\u767c\u9001\u5230\u5e7e\u500b\u7b2c\u4e09\u65b9\u7cfb\u7d71\uff09\u3002\u90a3\u9ebc\u60a8\u61c9\u8a72\u5275\u5efa\u65b0\u51fd\u6578\u4f86\u5c01\u88dd\u5e7e\u500b\u65b9\u6cd5\u4e26\u4f7f\u7528\u5b83 --><\/span><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>body<span class=\"token punctuation\">&gt;<\/span><\/span>  <span class=\"token comment\" spellcheck=\"true\"><!-- \u6b64\u8173\u672c\u5c07\u5275\u5efa\u51fd\u6578 \"myLogger()\"\uff0c\u7576\u88ab\u8abf\u7528\u6642\u5c07\u57f7\u884c\u4e09\u4ef6\u4e8b\uff1a1. \u5728 ManyChat \u4e2d\u89f8\u767c\u4e8b\u4ef6 2. \u5728\u63a7\u5236\u53f0\u4e2d\u5beb\u5165\u55ae\u8a5e \"test\"\uff08\u67e5\u770b DevTools-Console\uff09 3. \u986f\u793a\u4e00\u500b\u5305\u542b\u55ae\u8a5e \"test\" \u7684\u6a21\u614b\u7a97\u53e3 \u7576\u7136\uff0c\u60a8\u53ef\u4ee5\u66f4\u6539\u6b64\u4ee3\u78bc\u4ee5\u89f8\u767c\u5e7e\u500b\u4e8b\u4ef6 --><\/span>  <span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>script<span class=\"token punctuation\">&gt;<\/span><\/span><span class=\"token script language-javascript\">    <span class=\"token keyword\">function<\/span> <span class=\"token function\">myLogger<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span>      window<span class=\"token punctuation\">.<\/span>MC_PIXEL<span class=\"token punctuation\">.<\/span><span class=\"token function\">fireLogConversionEvent<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">'buy_button_clicked'<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>      console<span class=\"token punctuation\">.<\/span><span class=\"token function\">log<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">'test'<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>      <span class=\"token function\">alert<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">'test'<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>    <span class=\"token punctuation\">}<\/span>  <\/span><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>script<span class=\"token punctuation\">&gt;<\/span><\/span>  <span class=\"token comment\" spellcheck=\"true\"><!-- \u5728\u9019\u88e1\u60a8\u8072\u660e\u5728\u6309\u9215\u88ab\u9ede\u64ca\u6642\u8abf\u7528 \"myLogger()\" \u51fd\u6578 --><\/span>  <span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>button <span class=\"token attr-name\">onclick<\/span><span class=\"token attr-value\"><span class=\"token punctuation\">=<\/span><span class=\"token punctuation\">\"<\/span>myLogger()<span class=\"token punctuation\">\"<\/span><\/span><span class=\"token punctuation\">&gt;<\/span><\/span>  ...  <span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>button<span class=\"token punctuation\">&gt;<\/span><\/span><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>body<span class=\"token punctuation\">&gt;<\/span><\/span><\/code><\/pre>\n<\/div>\n<h2 data-identifyelement=\"562\"><strong data-identifyelement=\"552\">comment<\/strong><\/h2>\n<p data-identifyelement=\"564\">The brief description above-all the information you need to get started quickly. Of course, there are many ways to use our Pixel (or better known as SDK)-for example, you can call this function from your own function to convert the data, and then trigger it in ManyChat. However, this story is another topic.<\/p>","protected":false},"excerpt":{"rendered":"<p>Overview ManyChat Pixel allows you to record website events. You can copy some code strings to your website, set up the events to track, [\u2026]<\/p>","protected":false},"author":20,"featured_media":0,"template":"","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"%%post_title%%","_seopress_titles_desc":"","_seopress_robots_index":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_eb_attr":"","_surecart_dashboard_logo_width":"180px","_surecart_dashboard_show_logo":true,"_surecart_dashboard_navigation_orders":true,"_surecart_dashboard_navigation_invoices":true,"_surecart_dashboard_navigation_subscriptions":true,"_surecart_dashboard_navigation_downloads":true,"_surecart_dashboard_navigation_billing":true,"_surecart_dashboard_navigation_account":true,"footnotes":""},"doc_category":[47],"doc_tag":[],"class_list":["post-937","docs","type-docs","status-publish","hentry","doc_category-manychat-advance"],"year_month":"2026-04","word_count":335,"total_views":"4068","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Michelle","author_nicename":"michelle","author_url":"https:\/\/manychat.com.hk\/en\/author\/michelle\/"},"doc_category_info":[{"term_name":"ManyChat Advance","term_url":"https:\/\/manychat.com.hk\/en\/docs-category\/manychat-advance\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/docs\/937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/users\/20"}],"version-history":[{"count":2,"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/docs\/937\/revisions"}],"predecessor-version":[{"id":1032,"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/docs\/937\/revisions\/1032"}],"wp:attachment":[{"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/media?parent=937"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/doc_category?post=937"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/doc_tag?post=937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}