Facebook Pixel

Is it possible to use Facebook Pixel in Ionic?

2 Likes

Did you find a solution?

Not exact … :confused:
We decided to try it, but i don’t have any info that it’s works properly.
PR agency of my customer ask me to add Pixels.

So just putted it into index.html and implemented some track events on some pages, ex.

window.fbq('track', 'Search', params);

but they mention some issue with Pixel, i don’t know exact, don’t have any contact with them.
After that they ask me to implement facebook events.


About the implementation of the pixel, according the following post on Stackoverflow, it might actually just not be possible

I think so you can use …but recently i’m using Facebook for advertisement its going high my website site url is http://www.prepglobe.com/jitendra-agrawal-gmat-trainer-delhi/ when i try to made a comapgin still now get so much helpfu Facebook …

For the record and about Facebook Pixel, it looks like the last iOS SDK 4.34.0 introduce something for hybrid apps

I opened a feature request in the facebook4 plugin https://github.com/jeduan/cordova-plugin-facebook4/issues/678

I can’t build something about it but if someone is interested and would like to build a feature, go for it

Hi,
has anyone added the Facebook Pixel script to a Ionic4 app?

<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window,document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
 fbq('init', 'xxxx'); 
fbq('track', 'PageView');
</script>
<noscript>
 <img height="1" width="1" 
src="https://www.facebook.com/tr?id=xxxx&ev=PageView
&noscript=1"/>
</noscript>
<!-- End Facebook Pixel Code -->

If yes, where did you put it to make it work?

Thank you very much

cld

Did you find out how to do it?

I put it in the index.html page.
But after some month I removed it because it was not used.

cld

You were not using it or it was not working?

Our customer asked us to insert the code, but since they didn’t use it I removed the code.
I don’t know if it was working, sorry.

I think yes, but it was just not useful.

cld


Mail priva di virus. www.avg.com

Thanks anyways, bro.