Answer the question
In order to leave comments, you need to log in
How to correctly install the Facebook pixel event code on the site?
Good afternoon!
Please help me figure out how to correctly install the Facebook pixel event code on the site compiled on Tilda.ws .
Basic code . The Facebook instructions say the basic code is set to Head. This was done in the constructor graph.
Event code The Facebook instructions say that " If after performing an action a person does not land on a new page, the event should be registered at the same time as the action is performed. For example: a person clicks the "Submit Order" button. In this case, add the event code to HTML elements such as buttons ."
But the constructor does not allow you to make changes to the button code, etc.
It is possible to create a separate HTML block
. Constructor features that can help are described herehttp://help-ru.tilda.ws/tips/javascript
But I do not have enough knowledge of what exactly I should write and where
Facebook suggests installing this code:
<!-- 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>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question