Hi there, We're looking to use RudderStack for Fac...
# support
m
Hi there, We're looking to use RudderStack for Facebook Pixel server-side events but are running into two issues: 1. (major) The
value
field in our
Purchase
events is always zero despite their being valid values set in both
properties.price
and
properties.value
2. (major) User data is nested in the
custom_data
object not
user_data
object so won't be picked up by Facebook for identifying customers 3. (minor) The server IP address is included and being picked up by Facebook as a client IP
m
Hey There! πŸ‘‹ Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
m
Serverside event:
Copy code
{
  "anonymousId": null,
  "context": {
    "library": {
      "name": "rudder-analytics-python",
      "version": "1.0.6"
    }
  },
  "event": "Order Placed",
  "integrations": {},
  "messageId": "a0ba9011-8912-4281-80dd-d9e7664228e4",
  "properties": {
    "city": "Hounslow",
    "country": "GB",
    "coupon_code": "",
    "currency": "GBP",
    "discount": 0,
    "discount_gbp": 0,
    "dropship_mixed_basket": null,
    "dropshipper_id": null,
    "dropshipper_order_id": null,
    "email": "rob@sungod.co",
    "first_name": "Robert",
    "has_preorder_items": false,
    "is_dropship": false,
    "is_held": false,
    "item_count": 1,
    "items": [
      {
        "discount": 0,
        "price": 65,
        "sku": "renegades-rgf_Mblack-rgle_Nblue-rgi_Bblue"
      }
    ],
    "last_name": "Watkiss",
    "order_id": 469269,
    "payment_method": "mastercard",
    "payment_source": "stripe_payment",
    "phone": "+44 7966 629261",
    "referred_by": null,
    "referrer_id": "UTnaQGhpSp",
    "shipping": 0,
    "shipping_gbp": 0,
    "shipping_method": "DHL Express",
    "state": "Brentford",
    "status": "SHIPPED",
    "subtotal": 65,
    "subtotal_gbp": 65,
    "tax": 0,
    "tax_gbp": 0,
    "total": 65,
    "total_gbp": 65,
    "tracking_number": "2476715065",
    "zip": "TW8 9QU"
  },
  "rudderId": "f8bb37d6-394d-4619-b108-4dc651785de6",
  "timestamp": "2023-02-01T13:22:05.812215+00:00",
  "type": "track",
  "userId": "rob@sungod.co"
}
Submitted Facebook event:
Copy code
{
    "body": {
        "XML": {},
        "FORM": {
            "data": [
                "{\"user_data\":{
                    \"external_id\":\"800481642d3b3eb50bda7a498f2d7de3be03736458d743307c43748df83a676b\"
                },
                \"event_name\":\"Purchase\",
                \"event_time\":1675257726,
                \"event_id\":\"a0ba9011-8912-4281-80dd-d9e7664228e4\",
                \"custom_data\":{
                    \"total\":65,
                    \"city\":\"d7cb811928ff389561b798c8d0882a9b974e279b14c493ead62ff8407a83438b\",
                    \"country\":\"b4043b0b8297e379bc559ab33b6ae9c7a9b4ef6519d3baee53270f0c0dd3d960\",
                    \"email\":\"800481642d3b3eb50bda7a498f2d7de3be03736458d743307c43748df83a676b\",
                    \"first_name\":\"2238dd61a1bf83816b40ad894518814b8edf7221d84d897ffd2c0466ace07c41\",
                    \"last_name\":\"8d9281a039ef8d4adaa7e871a452a90e16053f1af010db972102cef67461664f\",
                    \"phone\":\"36717e042eb016a42a2947f758beda4f6c5a11add8116134d716fd185c9d3009\",
                    \"state\":\"bb425ed28d8d445665b339dd42d26243b85ad666eeaa4e0c1e72cf4e6ebfae66\",
                    \"zip\":\"572ff164ef77177c9ab3fc71faae428d7a364f6f41f2f242a1220efc9d1d85c3\",
                    \"content_ids\":[\"renegades-rgf_Mblack-rgle_Nblue-rgi_Bblue\"],
                    \"content_type\":\"product\",
                    \"currency\":\"GBP\",
                    \"value\":0,
                    \"contents\":[{\"id\":\"renegades-rgf_Mblack-rgle_Nblue-rgi_Bblue\",\"quantity\":1,\"item_price\":65}],
                    \"num_items\":1
                }}"
            ],
            "test_event_code": "TEST95988"
        },
        "JSON": {},
        "JSON_ARRAY": {}
    },
    "type": "REST",
    "files": {},
    "method": "POST",
    "params": {},
    "userId": "",
    "headers": {},
    "version": "1",
    "endpoint": "https://graph.facebook.com/v13.0/647269153434525/events?access_token=EAAN0jzG2TCYBAAR3ZAct4KZBzmmbKzpcGlIgFvwHJGllThmdYZCj2o80gkTOF6lfZArP7blNvKblaIEd4dbXCjULVJ4Fg6ZBYNZB3ZAGZB9hvcdBaXkKBO6bZA5p2TzoQvm9S77qaZCV1TvQP5fcrJ4kOBHPdszXdvZA41BbO1bS9JpYVxLas7WCQ5DDI4LnfhfHsAZD"
}
(Original message updated to add a third issue)
(It appears I've been able to remove the IP address with a transformation)
❀️ 1
@early-stone-68655 I'm still unable to get a value through to Facebook. Can you help? (We're on the paid plan not open source)
q
Hi @melodic-lion-74852 In your Facebook pixel configuration, you have used
properties.value
as value field identifier but I don’t see this property in the event that you have shared above. Can you add this property to your payload and try?
m
Hi @quiet-wolf-72320 thanks for getting back to me - I've added it through a transformation
q
I see. Are you using Facebook pixel in device mode and applying a transformation?
m
Nope, we're using this in cloud mode. Other elements of the transformation are working as expected (eg
items
to
products
) but not the value
q
can you disable this and give it a try?
m
No joy, unfortunately - value is still zero
q
I am checking it with the team. Allow me some time
m
Thanks @quiet-wolf-72320 πŸ™‚
q
@late-pillow-88086 fyi..
b
@melodic-lion-74852 For Purchase (like order placed or completed), we are computing value from properties.revenue field. Ref: https://github.com/rudderlabs/rudder-transformer/blob/7d29cb1ac4d1695311044cb00181dc00e91d9962/src/v0/destinations/facebook_pixel/transform.js#L78
βž• 1
m
Thanks @quiet-wolf-72320, @bland-smartphone-16365 - that's fixed it. Looks like the docs needs a little updating πŸ‘
q
Yes @melodic-lion-74852. We have taken a note to update the relevant docs
b
+1 providing the
revenue
field solved this problem for us I would highly encourage prioritizing updating the relevant docs because we missed out on a lot of data, and I suspect many others will as well
πŸ‘ 1