Squarespace

Best Practices Prior to Pixel Implementation:


When inserting pixel code, Squarepace may ask you to disable code injection while editing your site.

To add JavaScript to a code injection field, surround the code with <script> and </script> tags.

Squarepace recommends adding CSS to the Custom CSS Editor instead of code injection. If you're adding pixel code to code injection, surround the code with <style> and </style> tags.

The footer area is defined by your site's template and version.

Ajax loading may prevent CSS added to code injection from loading correctly. Add CSS to the CSS Editor instead.


Adding the Pixel

1) In the Home menu, click "Settings" >> click "Advanced" >> then click "Code Injection."

2) Add HTML or scripts into the appropriate Code Injection fields for the header, footer, lock page, or order confirmation page.

3) After adding your code, click "Save".


Header

Code added here is injected into the <head> tag on every page in your site.


Footer

Code added here is injected before the closing </body> tag on every page in your site.


Lock page

The lock screen appears when a page or site is hidden behind a site-wide or page password. Code injected here displays above the lock screen's password field. Although you can add code to this field, we recommend you use the Lock Screen panel to design your lock page instead. That way, you can add a background image or slideshow, adjust font styles, incorporate your logo, and more.


Order confirmation page

Code added here is injected into the order confirmation page that appears after a customer checks out. This works well for adding third-party tracking and affiliate programs to your store.

There are six tags you can use to insert information specific to the customer:

  • ● {orderId} - The order number of the confirmed order
  • {orderSubtotal} - The subtotal of the confirmed order
  • {orderSubtotalCents} - The subtotal of the confirmed order, in cents
  • {orderGrandTotal} - The grand total of the confirmed order
  • {orderGrandTotalCents} - The grand total of the confirmed order, in cents
  • ● {customerEmailAddress} - The customer's email address, as they enter it in the "Your Email" section at checkout