trying to get FB event code to fire on a button click (Download button on this page: https://frequencydigital.com/guide-download/).
I saw this earlier post, however the code suggested by Brandon is not working for me: Add FB pixel event code into button - Squarespace
Per Facebook, they provide this code to use, however not working either:
<!-- The below method uses jQuery, but that is not required -->
<button id="addToCartButton">Add To Cart</button>
<!-- Add event to the button's click handler -->
<script type="text/javascript">
$( '#addToCartButton' ).click(function() {
fbq('track', 'AddToCart', {
content_ids: ['1234'],
content_type: 'product',value: 2.99,currency: 'USD'
});
});
</script>
When I view source for the page I'm trying to update, the button code is:
<div class="form-button-wrapper form-button-wrapper--align-center">
<input class="button sqs-system-button sqs-editable-button"
type="submit" value="Download"/>
</div>
Not sure what I'm doing wrong here.