WordPress Template for Gray Licensees | Facebook Pixel

Susana Moleón
Susana Moleón
  • Updated

Where can I find it?

SIDE PANEL > SETTINGS > GRAY LINE LICENSEE TOURCMS PLUGIN

bdfc9014-d111-4395-823c-cdcb20dc2ece.png

 

What does it mean?

This guide provides an introduction to the Facebook Pixel, explaining its function, how it integrates with your WordPress website, and the significant benefits it offers for optimising your advertising and understanding customer behaviour.

The Facebook Pixel is a small piece of JavaScript code that you place on your website. It's essentially an analytics tool that allows you to measure the effectiveness of your advertising by understanding the actions people take on your website. When a visitor lands on your site and performs an action (such as viewing a page, adding an item to their basket, or making a purchase), the Pixel "fires" and records this event. This data is then sent back to your Facebook Ads Manager.

How have we implemented it?

We have integrated the Facebook Pixel with Standard Tracking Events into the Gray Line Licensee whitelabel codebase.

All standard events are tracked by calling the pixel's fbq('track') function, with the event name, and (optionally) a JSON object as its parameters. For example, here's a function call to track when a visitor has completed a purchase event, with currency and value included as a parameter:

fbq('track','Purchase',{currency:"USD", value:30.00});

What events are being tracked?

  • PageView
  • View content (tour pages)
  • Search
  • Contact
  • Add to cart
  • Initiate checkout
  • Purchase

What sort of data will I see?

You will see information related to the above events.

You can click into events and view further information available

P1.png

P2.png

P3.png

P4.png

 

O5.png

P6.png

What should I do?

Create the Pixel

  1. Login to business.facebook.com
  2. Select the option to manually add pixel code to a website
6fb31e29-4741-4a5e-91af-230395c99bee.png

3. Copy the Pixel code

df4d44cd-9fb1-4dec-a690-8db5ff2e9e12.png

Facebook Pixel script code

 

4. Turn on automatic advanced matching

P9.png

5. Add events using event setup tool - this step can be skipped (we have already added event triggers into the codebase)

6. Verify domain name - choose the DNS TXT record option. Follow Facebook's instructions. To add the DNS record, login to your CloudFlare account, go to DNS, and add in the new TXT record as provided by Facebook.

Type: TXT

Name: @

TTL: Auto

Content: <<< insert data provided by facebook >>>>

7. Go back to Facebook and click verify.

P10.png

P11.png

Note: don't use "grayline-dev.com" for the Name field, make sure you use your own domain name or simply write "@" 

8. Configure web events - this can be done by you / your marketing team now or later, please see Facebook's instructions for further information

P12.png

Configure your website with the Facebook Pixel ID

  1. Login to WordPress and go to SIDE PANEL> SETTINGS> GRAY LINE TOURCMS LICENSEE TOURCMS PLUGIN

2. Enter the Pixel code into the Facebook pixel tracking ID field 

5e25a91e-c7e7-4b08-ab90-eeb2d9963300.png

The Facebook Pixel allows you to track when a key page is viewed. To do this:

  1. Install the Facebook Pixel Helper chrome browser extension to verify the events 
167b0345-df49-4361-adb7-d54992f2e48b.png

2. You can check the tracking details in the plugin by clicking on ‘ViewContent’ 

bfe856d0-0280-49be-9608-4dbfc9da0215.png

How do I analyse the data and use this with Facebook Ads?

Further data analysis and Facebook Ad configuration is beyond the scope of this article. We recommend either reading the Facebook documentation and following along yourself, or outsourcing to a third party Marketing & Analytics company to do this for you.

Cookies, Tracking and GDPR

Facebook Pixel tracking will NOT occur unless a user has explicitly accepted marketing & analytics cookies. See here for further info > Cookie Consent GDPR

Note: Apple's iOS 14.5 changes require apps in the App Store that engage in what Apple defines as "tracking" to show a prompt to iOS 14.5 and later users in accordance with their AppTrackingTransparency framework. These changes affect how Facebook receives and processes events from tools such as the Facebook pixel. If you optimise, target or report on web events from Facebook pixel or any of our other business tools, you can take steps to update your event setup and manage these changes. Learn more

Troubleshooting

Is there no data populating inside of Facebook?

Note: data does not populate immediately inside the Facebook graph, you may need to wait 30 mins and you need to refresh the page to see fresh data. 

Use this Chrome Tool to debug & make sure your Facebook events are firing

https://developers.facebook.com/docs/facebook-pixel/support/pixel-helper

You should see a green icon and details about events when using this tool. 

P16.png

(Note: in case an event is triggered at the same time as a page redirect, e.g. AddToCart, you will not see such events populating in the tester tool)

If this tool doesn't work / you don't see anything, check your Facebook Pixel ID is correct.

Also try clearing your cache to get the latest code updated correctly. 

Clear the website cache: /hc/en-us/articles/29134612801297

 

Further Reading

About FB Pixel: https://www.facebook.com/business/help/742478679120153?id=1205376682832142&helpref=faq_content

Create and install FB Pixel : https://www.facebook.com/business/help/952192354843755?id=1205376682832142

Chrome extension tool for testing the pixel : https://developers.facebook.com/docs/facebook-pixel/support/pixel-helper

Standard tracking events: https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking#standard-events