Skip to content

Commit bb5b789

Browse files
[FIX] facebook_pixel_tracking: purchase tracking
1 parent 5707079 commit bb5b789

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

facebook_pixel_tracking/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{
2121
'name': 'Facebook Pixel Tracking',
2222
'category': 'website',
23-
'version': "16.0.1.0.0",
23+
'version': "16.0.1.1.0",
2424
'author': 'ADHOC SA',
2525
'website': 'www.adhoc.com.ar',
2626
'license': 'AGPL-3',

facebook_pixel_tracking/static/src/js/website_sale_tracking.js

+22-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ odoo.define("facebook_pixel_tracking.tracking", function (require) {
3232
'content_type': 'product',
3333
'value': product_price,
3434
'total': amount,
35+
'currency': 'ARS',
3536
}
3637
this._pushInfo('AddToCart', dict);
3738
},
@@ -46,6 +47,7 @@ odoo.define("facebook_pixel_tracking.tracking", function (require) {
4647
'content_ids': [product_sku || product_id],
4748
'content_type': 'product',
4849
'value': product_price,
50+
'currency': 'ARS',
4951
}
5052
this._pushInfo('AddToCart', dict);
5153
},
@@ -75,7 +77,26 @@ odoo.define("facebook_pixel_tracking.tracking", function (require) {
7577
'event':'purchase',
7678
'ecommerce':info
7779
}
78-
this._pushInfo('OnPurchaseConfirm', dict);
80+
const dict2 = {
81+
value: 115.00,
82+
currency: 'USD',
83+
contents: [
84+
{
85+
id: '301',
86+
quantity: 1
87+
},
88+
{
89+
id: '401',
90+
quantity: 2
91+
}],
92+
content_type: 'producto prueba'
93+
}
94+
95+
// this._pushInfo('OnPurchaseConfirm', dict);
96+
fbq('track','Purchase', dict);
97+
fbq('track','OnPurchaseConfirm', dict);
98+
fbq('track','Purchase', dict2);
99+
fbq('track','OnPurchaseConfirm', dict2);
79100
this._super(...arguments);
80101
},
81102
})

0 commit comments

Comments
 (0)