Can I add Facebook Conversion Tracking in Google Tag Manager?

痞子三分冷 提交于 2019-12-20 02:41:26

问题


I would line to add the Facebook Conversion Tracking pixel in the Google Tag Management. The only problem I see is that FB is asking to have the code between tags while GTM sits after ... kind of confusing. any ideas ?


回答1:


FB conversion tracking code should be between <body> and </body>. Proper deployment of Google Tag Manager is to put container code directly after <body>. So there is no problem.




回答2:


I was able to configure the Facebook Pixel in Google Tag Manager by doing the following. (this assumes you have your Facebook Pixel code, and a Google Tag Manager account configured.)

  1. Click on "New Tag."

  2. In the "Tag Type" dropdown list, select "Custom HTML Tag." Since there is no preset template for the Facebook conversion pixel, we need to use the Custom HTML Tag template. Name the Tag whatever you would like. For this example, we'll call it "Sales Conversion - Facebook"

  1. Paste your Facebook conversion pixel code into the "HTML" box.

  2. Click on the "+ADD" button for "Firing Rules" to add a new firing rule.

  3. In the "Add Rule(s) modal that opens, select the "Create new rule" radio button, and name your rule. From there, you want to add the condition for which you would like your rule to fire. Once you have created your rule, click "Save" to close the modal.


(Since I am tracking conversion of user sign up, I want this to fire when the confirmation page is reached; so I added {{url}} CONTAINS /user/signup/confirmation.)
  1. Click "Save."

  2. Once returned to the Container page, make sure to publish your changes by clicking the "Publish" button at the top (right side, for me) of the page.

  3. Test to make sure your rule fires when you want. Facebook has created a great chrome extension to help you troubleshoot if the pixel is firing, available here.

To test, install the extension, navigate to a page that doesn't meet your condition and verify that the pixel wasn't loaded, then navigate to a page that does meet your condition and verify that the pixel was loaded.

Cheers!

Complete set up instructions can be found here: http://www.clickz.com/clickz/column/2282137/take-control-of-tagging-with-google-tag-manager-part-1-of-3



来源:https://stackoverflow.com/questions/17752231/can-i-add-facebook-conversion-tracking-in-google-tag-manager

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!