Where can I find it?
SIDE PANEL > SETTINGS > GRAY LINE LICENSEE TOURCMS PLUGIN
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
What should I do?
Create the Pixel
- Login to business.facebook.com
- Select the option to manually add pixel code to a website
3. Copy the Pixel code
Facebook Pixel script code
4. Turn on automatic advanced matching
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.
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
Configure your website with the Facebook Pixel ID
- 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
The Facebook Pixel allows you to track when a key page is viewed. To do this:
- Install the Facebook Pixel Helper chrome browser extension to verify the events
2. You can check the tracking details in the plugin by clicking on ‘ViewContent’
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.
(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