How can I prevent Purchase Pixel Hack in my online store?

Hello!

Have any of you guys ever heard about it? Many people here in Brazil are using a script inside Shopify stores to emulate a sale after they see the ad on Facebook.

Basically, they see the ad on Facebook using MyAdFinder or whatever, access the product page and then fire the script, which is located on a favorited page in the browser. This makes the Facebook Pixel marks a sale and supposedly show them more related ads (for product mining), since Facebook recognizes this behaviour as a person that makes a lot of online purchases.

Is there any way I can block this script inside my Shopify store? Since this f*cks up the Facebook pixel.

Here is the culprit:
javascript:(function(){ var codigo = document.getElementById(“ProductJson-product-template”); if(codigo == undefined){ content_id = meta[“product”][“id”]; } else { var content_id = JSON.parse(codigo.text)[“id”].toString(); } fbq(‘track’, ‘Purchase’, { content_type: ‘product_group’, content_ids: ‘[’ + content_id + ‘]’ , value: 99.00, num_items: 1, currency: ‘USD’, }); console.log("O pixel de PUR foi ativado com sucesso para o content ID: " + content_id); })();

Thanks!

I have a solution for this issue. this solution block hacker activity

Whats the solution!?

What is the solution please?

Hello, got the solution from another dropshipper, change your facebook pixel code in your theme.liquid to the following:

Remember to add your pixel in both highlighted spots at the code. This will disable the purchase script in your store.

Hello, what do you mean by “this will disable the purchase script” please? We still need it to track the purchases from the ads.

This code will only disable fake sales because of the script hack, real sales will be tracked as usual.

Can this script be added even-though I have the pixel implemented through the native Meta/Shopify app? I heard you can only either use the native integration or the manual one in theme.liquid, but not both. Could you please clarify this? Thank you.