SEO, AdWords, affiliates, advertising, and promotions
Hi All,
I have been stuck on this one for awhile so any help would be greatly appreciated. I have moved to manual pixel code for reasons and things have been working smoothly except the Purchase event. For some reason, it is reporting twice on facebook analytics. I believe i have everything done correctly. Removed the pixel id from shopify integrations. Add the proper checkout code and wrapped it in first time access. Am i missing a crucial step? Is this a bug? Would appreciate any assistance you can offer.
Thank you.
Solved! Go to the solution
This is an accepted solution.
What finally resolved this double activation was checking for the instance of fbq.
So inside the first_time_accessed, having an additional conditional check:
if(typeof fbq === 'undefined') { }
Thank you to all that responded and tried to help.
Paste the code you are using here. Use the Facebook Pixel Helper Chrome extension to confirm a pixel or two different ones are firing the Purchase event. View the source code to see where these Pixel IDs are located and firing. Perhaps you have Google Tag Manager firing another pixel or sometimes third-party apps.
{% if first_time_accessed %}
<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','//connect.facebook.net/en_US/fbevents.js'); // Insert Your Facebook Pixel ID below. fbq('init', '00000000000'); fbq('track', 'Purchase', { content_ids: [{% for item in order.line_items %}'{{item.sku}}',{% endfor %}], content_type: 'product', value:'{{ subtotal_price | money_without_currency | remove: ','}}', currency: 'GBP', }); </script>
{% endif %}
The checkout code does contain other event listeners but they are for for google tag, bing and pinterest. I was unable to properly test the event using pixel helper as turning the site to test mode is not allowed. I have been working with live data and noticed double conversions for every purchase event as soon as i made the switch. No other event is reported twice... Thank you for responding.
After checking the events in purchase. It is indeed fired twice. However looking in the html code, when searching by pixel ID, i find only one instance of the pixel being initiated, the purchase event code i pasted.
The console log does show this:
Does Shopify checkout code mess with facebook pixel code?
Hello Josh,
I have the exact problem with this. Can you please help me? I have been in contact with both Shopify and facebook regarding this. For some reason it shows that I have 22 website purchases today when I only have 2. It feels like the pixel triggers on any action at all on the website.
Help! Same problem like user EVRYBDY. 😞 As I understand, the solution is to paste the script into Shopify Checkout -> Additional Scripts?
Is this the script to paste? Can someone confirm or explain? Thanks!
{% if first_time_accessed %} // Conversion scripts you want to run only once {% endif %} // Scripts you want to run on every visit if(typeof fbq === 'undefined') { }
Go through this link: https://leoebbert.com/how-to-fix-a-double-counting-facebook-pixel-in-shopify/
Hope you find it helpful.
Regards,
hi aman, If its okay - could you please tell me if my pixels are firing twice. I have two fb pixels installed on my website. Are each of them firing twice for purchase events? My website is isadoralife.com
Hey DenisG0,
Would you mind sharing your store URL? It would be easier to grab the issue then.
Thanks!
Hi Arpan,
This is the order confirmation page i was using. https://cuddleandkind.com/3083763824/checkouts/4d090060c2203c73ae8f37dc93b3d4bd/thank_you
I have switched back to shopifys native integration as the double reporting was messing with my ROAS.
Like i said, there were no issues with other events except the purchase event found on order confirmation page.
Perhaps the tag "first_time_accessed" is simply not working?
This is an accepted solution.
What finally resolved this double activation was checking for the instance of fbq.
So inside the first_time_accessed, having an additional conditional check:
if(typeof fbq === 'undefined') { }
Thank you to all that responded and tried to help.
Hi @DenisG0
I have again checked, your add to cart event on facebook is occurring twice, it needs to be corrected.
Regards
Thanks for pointing that out. Currently the store is using Shopifys native pixel integration so that is troubling to hear.
Hi i am facing the same issue it been a month and this error is messing up with my results. my every facebook campaign is showing double purchases events. how can i solve this ? its urgent
Please Help me Out & im struggling with same. its been 2 months now
Same problem here... Using the Conversion API makes every purchase event fired twice... Don't know what to do... Anyone solved this?
Hi, I am having a similar issue.
Used the native shopify Facebook app to connect the pixel.
My issue is that the purchase event pixel fires everywhere - even when I visit the page. Can someone help, please?
The website is indosoleeurope.com (need to use a VPN for europe)
Hi @DenisG0 I noticed your order page isn't sending Purchase events. That's exactly what I'm trying to fix on my site. My question to you, are you still using the Native Integration method for FB pixel?
hi arpan, i think my fb pixels are firing twice. I have two fb pixels and i think each of them are firing multiple times for a single event. Can you pls guide - isadoralife.com
This happens when you pixel tracking is not on point, and in my opinion as a digital marketers, tracking your data in the core core responsibility.
So i suggest everyone to please put your focus on your tracking, how are you tracking your data and how are you segmenting it, because if you have a lot of data and you did not segmented it very well means you are not utilising the data,
For that i would suggest you guys WinAds.
This app helps me always with on point Tracking and catalog setup.
PLUS PLUS
they give you hyper event, means normal facebook pixel gives your Viewcontent, Add to Cart, IC, Purchase.
But that app make you Pixel boost up with a-lot of other hyper event,
Like:
PageScroll,
Time Spent,
Showed Interest,
Customer Tagging,
High Spender,
Abandon Cart,
Still Thinking,
Prospect.
And all these events have login behind them, for example showed interest is like when some one view your product then change the varients of your product.
Thanks 🙂
Yes, I agree with you, Qash. I am also using that app, hyper events give me so many new lookalikes, and new lookalike means new audience to target, and new audience means Scaling which I love to do.
User | RANK |
---|---|
9 | |
8 | |
3 | |
3 | |
3 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023