Enabling 3rd Party Tracking on Yext Pages

Hi Pages Team,

A client uses Facebook pixel code to track clicks on their Yext powered pages. Currently they track clicks on the “find your store” button, but are trying to also track clicks on the “Search” button.

This is the current header code:

<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create', 'UA-111612618-1', 'auto');ga('send', 'pageview');</script>
<meta name="Facebook-domain-verification" content="exrg9hhywi7ntxj4ngdivp7ux7t2jm" />
<!-- Facebook Pixel Code -->
s.parentNode.insertBefore(t,s)}(window, document,'script',
fbq('init', '437547367483447');
fbq('track', 'PageView');
<noscript><img height="1" width="1" style="display:none"
<!-- End Facebook Pixel Code -->Preformatted text

What would need to be changed so that they can track clicks on the Search button? Thank you!

Hi Harris! Apologies for the delay here. Since the pixel code is inherent to Facebook as opposed to Yext, the team here is probably not the best resource to advise on changes to make to target specific elements. The best place to reach out to for advice is probably for the client to speak with Facebook for Business support on this one.

1 Like