Facebook Pixel tracking code

  • WAIRC
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

WAIRC created the topic: Facebook Pixel tracking code

Hi, I am new to Breezing Forms and want to track facebook promotions.
Below is the code I have but not sure how to add it to the submit button.

The form is loaded in a module at the bottom of a single page marketing webpage, but does go to a thankyou page within the module on submit.

If someone could tell me how I add the code in that would be great.


<!-- Facebook Conversion Code for xxxxxx -->
<script>(function() {
var _fbq = window._fbq || (window._fbq = []);
if (!_fbq.loaded) {
var fbds = document.createElement('script');
fbds.async = true;
fbds.src = '//connect.facebook.net/en_US/fbds.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(fbds, s);
_fbq.loaded = true;
}
})();
window._fbq = window._fbq || [];
window._fbq.push();
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src=" www.facebook.com/tr?ev=351565466&cd [value]=0.01&cd[currency]=AUD&noscript=1" /></noscript>
#140747
  • Posts: 15270
  • Karma: 287
  • Thank you received: 1074

pedro81 replied the topic: Facebook Pixel tracking code

Hi,

where did you found that code? A link to that API info could be very helpful in order to try to implement it.

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#140813
  • WAIRC
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

WAIRC replied the topic: Facebook Pixel tracking code

The code is generated out of facebook when you run promotions. It is to enable you to track conversions from facebook.

For the time being I have implimented the code into the page header so that I capture conversions from Facebook to the page.

I really want to move the code to a submit button so that it is only activated when the user clicks submit.

Ther submit displays a thankyou page, but is in the footer of the same page as it is in a module. Maybe adding it into the thankyou page display would solve the problem as it is only displayed when people submit the form.
#141147
  • Posts: 6982
  • Karma: 187
  • Thank you received: 628

chrisal replied the topic: Facebook Pixel tracking code

Hello WAIRC,


do you use a thank you page? If yes - copy the following code into the Before Form piece of your form:
if( JRequest::getInt( 'ff_status', -1 ) == 0 ){
//your tracking code here
}

With this the tracking code will only be executed - when the user submits the form.


regards
Chris

Regards,
Christian

===============================================
Satisfied? Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
#141235
The following user(s) said Thank You: aligia GmbH
  • WAIRC
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

WAIRC replied the topic: Facebook Pixel tracking code

Thanks that wqorked perfectly
#141639
  • Posts: 15270
  • Karma: 287
  • Thank you received: 1074

pedro81 replied the topic: Facebook Pixel tracking code

Great!

let us know if you have further questions.

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#141645
Moderators: ForumSupporttomeperica
Time to create page: 0.097 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here