Skip to content

Commit

Permalink
[FIX] facebook_pixel_tracking: purchase tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasperalta1 committed May 23, 2024
1 parent 5707079 commit bb5b789
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion facebook_pixel_tracking/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
'name': 'Facebook Pixel Tracking',
'category': 'website',
'version': "16.0.1.0.0",
'version': "16.0.1.1.0",
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
Expand Down
23 changes: 22 additions & 1 deletion facebook_pixel_tracking/static/src/js/website_sale_tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ odoo.define("facebook_pixel_tracking.tracking", function (require) {
'content_type': 'product',
'value': product_price,
'total': amount,
'currency': 'ARS',
}
this._pushInfo('AddToCart', dict);
},
Expand All @@ -46,6 +47,7 @@ odoo.define("facebook_pixel_tracking.tracking", function (require) {
'content_ids': [product_sku || product_id],
'content_type': 'product',
'value': product_price,
'currency': 'ARS',
}
this._pushInfo('AddToCart', dict);
},
Expand Down Expand Up @@ -75,7 +77,26 @@ odoo.define("facebook_pixel_tracking.tracking", function (require) {
'event':'purchase',
'ecommerce':info
}
this._pushInfo('OnPurchaseConfirm', dict);
const dict2 = {
value: 115.00,
currency: 'USD',
contents: [
{
id: '301',
quantity: 1
},
{
id: '401',
quantity: 2
}],
content_type: 'producto prueba'
}

// this._pushInfo('OnPurchaseConfirm', dict);
fbq('track','Purchase', dict);
fbq('track','OnPurchaseConfirm', dict);
fbq('track','Purchase', dict2);
fbq('track','OnPurchaseConfirm', dict2);
this._super(...arguments);
},
})
Expand Down

0 comments on commit bb5b789

Please sign in to comment.