Using Facebook pixel with Squarespace
30/11/2019
If you're using Squarespace for your website and want to install the Facebook pixel, follow these steps:
In this article
Get your Facebook pixel code
If you haven't created a Facebook pixel yet
- Go to the Facebook pixel section in Ads Manager.
- Click Create a pixel.
- Enter a name for your pixel. You can only have one pixel per ad account, so choose a name that represents your business.
- Tick the box to accept the terms.
- Click Create pixel.
- (Optional) Click the toggle icon to enable Advanced matching.
- Click anywhere on the Facebook pixel code to copy it.
If you've already created a Facebook pixel
- Go to the Facebook pixel section in Ads Manager.
- Click Set Up Pixel.
- Click Copy and paste the code.
- (Optional) Click the toggle icon to enable Advanced matching.
- Click anywhere on the Facebook pixel code to copy it.
Add the Facebook pixel to your website
- Log in to Squarespace.
- Select your site.
- In the Home menu, click Settings.
- Click Advanced.
- Click Code injection.
- Paste your Facebook pixel code in the Header box.
- (Optional) Type in em: '{customerEmailAddress}' on line nine to leverage your customer email address data to help you optimise for conversions.
- Click Save in the upper left-hand corner.
Track events happening on your site
Once you've created a Facebook pixel and installed it on your site, you'll get access to richer audience targeting and measurement options by placing event code on key pages of your website.- Create new audiences based on actions people took on your site. For example, you can create an audience with people who visited your shop page but didn't convert, and then set up a Facebook remarketing campaign.
- Find potential customers similar to people who have taken actions you care about on your site, like making a purchase, by creating a Lookalike Audience based on people who completed purchase events.
Getting started
Add event code to your site to track actions you care about, like page visits, purchases and how many items people add to their baskets.Track page visits of people who've visited your Shop page
- Go to the pixels tab in Ads Manager
- Click Set up pixel
- Click Copy and paste the code
- Click Install event code
- Click View content and click to copy the view content code.
- Log in to Squarespace.
- Select your site.
- In the Home menu, click Settings.
- Click Advanced.
- Click Code injection.
- Paste your view content code in the footer section to be able to track visits to each page of your website.
- Click Save in the upper left-hand corner.
Note: The value represents an estimate of what a visit to your page is worth. For example, if your average order size is £100 and, based on your site's history, two out of every one hundred visitor converts, then the value of a page visit is £2.
Track purchases people make on your site
- Go to the pixels tab in Ads Manager
- Click Set up pixel
- Click Copy and paste the code
- Click Install event code
- Select Purchase and click to copy the purchase code.
- Log in to Squarespace.
- Select your site.
- In the Home menu, click Settings.
- Click Advanced.
- Click Code injection.
- Paste the code from step 5 in to the Order confirmation page section.
- Change the text after "value" in your code to "{OrderGrandTotal}". For example, in the image above, we deleted the dollar amount value of "247.35" from the code and typed in "{OrderGrandTotal}" instead. Making this change will help you best track the actual value of purchases that customers make on your site as a result of your Facebook ads.
- Click Save in the upper left-hand corner.
Track how many items people add to basket
- Go to the Custom conversions section in Ads Manager.
- Click Create custom conversions
- Type in the URL that appears when people click to add an item to their basket on your website.
- Click Choose a category.
- Select Add to basket.
- Name your event. Use a descriptive name so you'll be able to keep track of this event in case you plan to make more conversion events. You can also click to add a description for your event.
- Tick the box if you'd like to set a conversion value (how much it's worth to you when someone adds an item to their basket). For example, if your average order amount is £100 and, in general, three out of every ten times an item is added to a basket results in a purchase, then you might say the conversion value for someone adding an item to their basket is £30 . Next, you have the option to set a conversion value.
- Click Create to finish setting up your custom conversion.
Check if your pixel is working
Once you've clicked Save/Publish at the top of your Tealium dashboard, you should check if your pixel is firing correctly. To check that your pixel is working properly:
- Navigate to the web page that the pixel was placed on. If it's working, the pixel will send information back to Facebook and you'll be able to see activity on the Facebook pixel page in your Ads Manager. Your pixel's status will also be set to Active. Bear in mind that the activity column reports all conversion events regardless of whether or not these events are associated with an ad.
- If it didn't work (No activity yet, No recent activity), use the Facebook Pixel Helper to troubleshoot the problem. Bear in mind that you have to be using the Chrome browser for it to work. Once the Pixel Helper has been installed, a small icon will appear next to your address bar. Navigate to your website in your Chrome browser and click the Pixel Helper icon.
The pop-up will tell you which pixels were found on the page and whether they have loaded successfully. If not, it will give you tips on why it may have failed. Learn more.
You can now start running ads on Facebook using conversion optimisation and tracking.
* Nguồn: Facebook