Hey all, we are using RudderStack with our React N...
# support
q
Hey all, we are using RudderStack with our React Native app. We are facing some issues with
google_ads
and
facebook_app_events
destination. The issue with
google_ads
is that events are failing with this error
We are setting the
ga4AppInstanceId
with the
track
,
screen
and
identify
calls, but still event delivery to google ads is failing
The issue with
facebook_app_events
is that all events (including standard events like
APP_INSTALL
) are sent as
CUSTOM_EVENTS
to facebook, facebook doesn't allow ads optimisation on custom events
So we cannot use these events to run ads
Can anyone suggest whats the solution to the above mentioned issues?
g
Can you please share the code snippet you use to set
ga4AppInstanceId
?
q
Copy code
rudderClient.track(
        "menu-button-click",
        {
          appVersion: getVersion(),
          eventSource: "mobile",
        },
        {
          externalId: [
            {
              type: "ga4AppInstanceId",
              id: ga4AppInstanceId,
            },
          ],
        },
      );
    };
@gentle-petabyte-80785 ☝️
f
@quiet-microphone-89528 the code snippet provided above is correct. Can you share some payloads for which you are seeing this error?
b
Hi @fierce-crayon-64520 Here is one:
Copy code
{
  "type": "identify",
  "sentAt": "2022-11-29T08:49:36.150Z",
  "userId": "68544856263",
  "channel": "server",
  "context": {
    "email": "care@trishona.com",
    "shopId": "gid://shopify/Shop/52345372871",
    "library": {
      "name": "analytics-node",
      "version": "1.1.4"
    },
    "shopName": "trishona-com.myshopify.com",
    "userName": "Shweta Mishra",
    "eventSource": "shopify"
  },
  "rudderId": "4b7a781c-10f6-4d32-9ef9-eed7e75a7b9f",
  "_metadata": {
    "nodeVersion": "17.9.0"
  },
  "messageId": "node-86612a3f88b7c53be01e9ead1d301f29-48b6b16e-9617-4189-bb9b-73d5a773d4ae",
  "timestamp": "2022-11-29T08:49:36.206Z",
  "receivedAt": "2022-11-29T08:49:36.209Z",
  "request_ip": "3.234.95.39",
  "originalTimestamp": "2022-11-29T08:49:36.147Z"
}
I think we need to enrich the payload with
externalId
(?)
f
Yes that is correct @brief-car-34008. But the code snippet should populate the
externalId
.
q
@brief-car-34008 any solution to the issue?
f
@quiet-microphone-89528 the code snippet to set externalId seems wrong you need to set
externalIds
inspite of
externald
. For reference https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-react-native-sdk/#external-id