Meta Pixel Tracking

How would we go about adding Meta Pixel code for all events created by a center group can track Facebook ad campaigns? If implemented within the config file, please provide step-by-step instructions. If not, please explain how to go about this.

Hi Jermel,

Sure thing, you can add any tracking code you want to your LWC theme. Probably the way you’d want to do this is using a little bit of XPHP logic. Inside of your theme includes (probably a file path like _ingredients/themes/global/includes/footer.html) you could do something like

<xphp content="true">
  <if var="group_directory" equals="/center-for-research/" />
  <content>
    <!-- LW: Paste your tracking code here -->
  </content>
</xphp>

Then any calendar views or event views under /center-for-research/ (swap in your preferred URL) would load your tracking code as part of the theme HTML. Hope this helps! If you’d like more hands-on help with editing your theme files, feel free to reach out via the Request Help Form.