A
A
Alexey L.2017-01-19 23:49:04
Facebook
Alexey L., 2017-01-19 23:49:04

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>

What code and where should I write in order to set up tracking of actions by pressing a button or watching a video?
The site where the problem is solved project148100.tilda.ws
Thank you all in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question