Thursday, November 23, 2023
HomeTechnologyHow to implement Facebook pixel?

How to implement Facebook pixel?

 

The Facebook Pixel, released in July 2015, has the advantage of making tag management easier by combining remarketing tags and conversion measurement tags into one . If you are still using the old tracking code instead of the Facebook Pixel, please read this article and consider migrating to the Facebook Pixel.


What is Facebook Pixel Code

Role of the Facebook Pixel

The Facebook pixel is a tag that integrates the following three roles.

  • Build custom audiences for remarketing
  • Conversion optimization with advertising
  • Conversion measurement

Advertising platforms such as Google AdWords and Yahoo Promotional Ads provide separate tags for generating remarketing lists and tags for measuring conversions. However, Facebook allows both remarketing list generation and conversion tracking to be achieved with a single Facebook pixel code. Since you can generate a remarketing list and measure conversions with a single tag, it is possible to reduce the tag loading speed and execution speed.

And if it is a URL-based conversion setting, you can set “When this URL is viewed, this conversion is counted” on the Facebook pixel management screen without setting a special tag only on the conversion page. (However, separate tag settings are required to measure “events” such as “add to cart” and “add payment information” that perform dynamic processing).

In addition, Facebook pixel code allows you to share pixel code between ad accounts,

Advertiser (or site creator) manages and installs one Facebook pixel code and shares the pixel code with advertising agencies and other marketing partners

It becomes possible. This eliminates the need for separate Facebook pixel implementations for advertising agencies and marketing partners.

Regarding the transition to the new pixel code

Facebook Advertiser Help Center – Facebook Pixel What’s new and changed states that the old conversion tracking pixel will be retired in late 2016 . Looking at the current situation where Facebook ads can still be placed without using the business manager, I’m not sure how much I can believe in this “discontinued in the second half of 2016”, but by using the Facebook pixel, Facebook Ad-related tags can be made very simple, so I think it’s good to migrate at the timing of a new project or some kind of site renovation.

Add Facebook pixel code

Get pixel code

To get your pixel code, you’ll need to visit your Facebook Ads account. Open your ad account in Business Manager and select “Pixel” in the “Tools” menu.

On the next screen, make sure that “Facebook Pixel” is selected, then click “View Pixel Code” in the “Action” menu to get the pixel code. Note that creating a pixel with “Conversion Tracking Pixel (Old)” selected will create an older version of the pixel.

How to add pixel code

When you get the code for the Facebook pixel, it will generate code like the one below. Place this tag on every page on your website. If you are using Tag Manager to manage your tags, there is no problem installing them from Tag Manager. In the case of Yahoo Tag Manager, there is a service tag template called “Facebook Pixel”, so use this. In the case of Google Tag Manager, since it is not in the tag provider, it must be installed as a “custom HTML tag”.

<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');

fbq('init', 'xxxxxxxxxxxxx');
fbq('track', "PageView");</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=xxxxxxxxxxxxx&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->

How to track conversions

If you want to track URL-based conversions, use the Create Conversions menu below.

Then select “Track custom conversions”.

After that, create a rule that narrows down the conversion page by fine-tuning the rule for common URLs.

Note that the custom conversion definition (rule) once created cannot be changed after creation, and the maximum number of conversions that can be created is 40. It’s important to note that custom conversion definitions cannot be changed. If the conversion page URL changes due to site configuration changes, etc., you will need to create a new custom conversion. With that in mind, it might be a better idea to customize your tracking code to set up event-based conversions rather than creating custom URL-based conversions. Also, the upper limit of 40 is twice the target upper limit of Google Analytics, so I don’t think it will be insufficient, but if you are a site that develops multiple independent services on one site, you may feel uneasy. increase.

How to create a remarketing list

Use the Create Audience menu below to create your remarketing list.

After that, the settings are the same as when creating remarketing lists on AdWords, Yahoo Display Network, etc. Please set the list conditions, applicable days, remarketing list name, etc.

Detailed event measurement

By default, Facebook can measure the following 9 types of events in order to measure user actions on the website in detail.

name explanation
View Content Track key pageviews
Search Track searches on your website
Add To Cart Track when items are added to your shopping cart
Add To Wishlist Track additions of items to your wishlist
Initiate Checkout Track when users enter checkout flows
AddPaymentInfo Track when payment information is added to the checkout flow
Purchase Track when a purchase or checkout flow is completed
Lead Track when users show interest in your suggestions

On the Facebook Ads management screen, you can see information such as the number of conversions for each unit and the conversion acquisition cost.

For detailed specifications of these Facebook Pixels, detailed information is listed in facebook for developers – Facebook Pixel , so it would be a good idea to refer to this. The developer information here also introduces a Chrome extension for checking pixel behavior called Facebook Pixel Helper.

Furthermore, these event measurements are not only counted as the number of conversion occurrences, but can also be used in conjunction with creating a remarketing list. Therefore, when creating a remarketing list,

  • Audiences that have fired the “AddToCart” event but not the “Purchase” event
  • Audiences that have fired the “Search” event but not fired the “AddToCart” event
  • Audiences who have not had a “Purchase” event within the last 30 days

You can create a list like

summary

The Facebook pixel code was released in July 2015, so it’s been a long time, so many people may have already migrated to the Facebook pixel code. If you are still using the old tracking code, why not take this opportunity to consider migrating your pixel code?

RELATED ARTICLES

What is StyleGAN?

Leave a reply

Please enter your comment!
Please enter your name here

Recent Posts

Popular Posts

Most Popular

Recent Comments