Adding tracking pixel to Pro button?

We’re working with a third party marketing company who wants to track activity on specific buttons on our site (i.e. “call now”, “request a quote”, etc).

I’ve previously added universal tracking pixels via functions.php file (google tag manager, etc) but is it possible to add a tracking pixel to Pro’s buttons? Here’s a couple of different methods they’ve provided below:

For iFrame format use:
<iframe width="0" height="0" name="Trade Desk Tracking - Contact Us" frameborder="0" scrolling="no" src="//insight.adsrvr.org/tags/eztuapu/rs91h6q/iframe"></iframe>

For Image format use:
<img height="1" width="1" style="border-style:none;" alt="" src="//insight.adsrvr.org/track/conv/?adv=eztuapu&ct=0:rs91h6q&fmt=3"/>

Hi There @armintz

Thanks for writing in! If you want to bind your X/Pro button, please follow this example here (https://developers.facebook.com/docs/facebook-pixel/advanced/#buttonclicks).

Basically, first you need to assign a unique ID to your button as in the example.

Then you can add the JavaScript code without the script tags (<script> and </script>), into your page’s custom JavaScript area.

Example:

Hope that helps.

Since the tracking code is an iFrame (or image format), wouldn’t this not be possible in the JS area?

Hi @armintz,

It’s not possible with iframe, iframe tracking is for page load event. Button tracking should be done by click event. Please follow the provided URL. If you’re not sure about the javascript implementation then I recommend contacting a developer.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.