Hello :wave: I have a problem with the `Google Ads...
# support
l
Hello šŸ‘‹ I have a problem with the
Google Ads Enhanced Conversions
- We tracking an
Order Completed
event, I get an error from Google APIs saying the payload is malformated (a problem with the
event
param the integration is sending). Request / Response details in threads.
Rudder stack request :
Copy code
{
  "version": "1",
  "type": "REST",
  "method": "POST",
  "endpoint": "https://googleads.googleapis.com/v10/customers/[REDACTED]:uploadConversionAdjustments",
  "headers": {
    "Authorization": "[REDACTED]",
    "Content-Type": "application/json",
    "developer-token": "[REDACTED]"
  },
  "params": {
    "event": "Order Completed",
    "customerId": "[REDACTED]"
  },
  "body": {
    "JSON": {
      "conversionAdjustments": [
        {
          "restatementValue": {
            "currencyCode": "EUR"
          },
          "orderId": "[REDACTED]",
          "userIdentifiers": [
            {
              "hashedEmail": "[REDACTED]"
            },
            {
              "hashedPhoneNumber": "[REDACTED]"
            }
          ],
          "adjustmentType": "ENHANCEMENT"
        }
      ],
      "partialFailure": true
    },
    "JSON_ARRAY": {},
    "XML": {},
    "FORM": {}
  },
  "files": {}
}
Google response :
Copy code
{
  "firstAttemptedAt": "2022-11-25T09:31:47.530Z",
  "response": "{\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Invalid JSON payload received. Unknown name \\\"event\\\": Cannot bind query parameter. Field 'event' could not be found in request message.\",\n    \"status\": \"INVALID_ARGUMENT\",\n    \"details\": [\n      {\n        \"@type\": \"type.googleapis.com/google.rpc.BadRequest\",\n        \"fieldViolations\": [\n          {\n            \"description\": \"Invalid JSON payload received. Unknown name \\\"event\\\": Cannot bind query parameter. Field 'event' could not be found in request message.\"\n          }\n        ]\n      }\n    ]\n  }\n}\n",
  "content-type": "application/json; charset=UTF-8"
}
Seems la
event
shouldn’t be here
šŸ‘‹ Antonis
Hey Antonis ! Did you have a chance to check ?
If that can help I am running both latest images :
rudderlabs/rudder-server:latest
and
rudderlabs/rudder-transformer:latest
Yes
We are running self hosted version of rudder on AWS ECS via docker images
Hello šŸ‘‹ did you have time to investigate ?
Hello Antonis šŸ‘‹ What payload do you need ? I have provided both request & response above (at the beginning of the thread)
Is there a simple way to get it ? I’m using the package
@rudderstack/rudder-sdk-node
Yes there is a customer id and event name, I have just replaced real values with « [REDACTED] » placeholders but there is real values in the payload
What I did is : • Open live events from Conversion API destination (in the control plane dashboard) • in my code, call
ruddertack.track('Order Completed', params)
using the node SDK • See in the live events pannel that I correctly get my event comes in, but with a 422 from Google APIs. • I copy pasted here what rudderstack sent to the google API (request) and also copy pasted the Response from google API (when I click on the ā€œcheck error detailsā€ in the live event pannel)
The only thing I changed in the input I got from the live events pannel before pasting it here is replacing real values with
[REDACTED]
for privacy (like api tokens, customer id, hashedEmail etc
So I didn’t use any ā€œrawā€ exemples, this is a live event tracking that my code fire using rudderstack node SDK. The input I copy pasted comes from rudderstack live events pannel (Google Conversion API destination that is actually configured with real google adwords crendentials in the control plane). Among Google Conversion APIs, the event is also dispatched to other connected destinations such avec Facebook Ads, TikTok, Snapchat Conversion etc, and they all work fine.
Does that makes things clearer ?
Hello Antonis, I am available if you need more details
We want adwords offline conversion so much šŸ™ˆ
Nope I login trough https://app.rudderstack.com/
We don’t host the control plane
Oh nice, but I’m a bit confused where do I set this setting ? I’m just booting the 2 docker images (server & transformer)
Should I set this as an env var ?
Seems I can’t because value of
GOOGLE_ADWORDS_ENHANCED_CONVERSIONS
is an object
(
transformerProxy: true
)
But I can’t see how I can somehow middleman into it
Yes I spotted the
Router
What I mean is
there’s no way for me to modify source that the docker images is built on
The only (unpredictable way) would be to fork the repo, update the config and rebuild the docker image myself
but there must be another way ?
omg, it works šŸ˜†
šŸ”„
Antonis, I need the exact same env variable for Google Ads Offline Conversions
(my other thread)
Ooooh
I tried replacing
ENHANCED
by
OFFLINE
for Google Ads Offline Converisons and it worked haha
RSERVER_ROUTER_GOOGLE_ADWORDS_ENHANCED_CONVERSIONS_TRANSFORMER_PROXY
=> Works for google enhanced conversions integration
RSERVER_ROUTER_GOOGLE_ADWORDS_OFFLINE_CONVERSIONS_TRANSFORMER_PROXY
=> Work for google offline conversion integration
šŸ”„ 🄳
Out of curiosity, is there something I can read about this ā€œconversion proxyā€ ? Why is it needed/how it’s used
Awesome šŸ‘ šŸ‘ I still have an error on ā€œGoogle Ads Offline Conversionsā€ integration but I don’t know if it’s related to rudder or google ads
by google ads I mean our config inside google ads backoffice
this is the error :
Copy code
{
  "firstAttemptedAt": "2022-12-01T07:25:28.572Z",
  "response": "{\"status\":400,\"message\":\"[Google Ads Offline Conversions]:: Conversion Custom Variable has not been created yet in Google Ads\",\"statTags\":{\"errorAt\":\"proxy\",\"destType\":\"GOOGLE_ADWORDS_OFFLINE_CONVERSIONS\",\"stage\":\"responseTransform\",\"scope\":\"exception\"}}",
  "content-type": "application/json"
}
Thanks Antonis, I didn’t know I we needed a conversion variable. I indeed checked google support doc and didn’t understand tbh but the article you sent from tracking chef make it very clear why it’s needed. Thank you very much.
Antonis, I might have found a bug tho (that I can get around) I think I need to show you
When I don’t send explicitely a
conversionDateTime
or
originalTimestamp
if my payload, Rudderstack automatically adds one
ex:
Copy code
"params": {
            "event": "Order Completed",
            "customerId": "[REDACTED]",
            "customVariables": [
                {
                    "from": "",
                    "to": ""
                }
            ],
            "properties": {
                "fbc": null,
                "fbp": null,
                "email": "test@mobile.club",
                "gclid": "test",
                "phone": "06 07 08 09 10",
                "total": null,
                "value": 16883,
                "revenue": 16883,
                "currency": "EUR",
                "discount": 0,
                "event_id": "Order Completed.28768",
                "order_id": 28768,
                "shipping": 825,
                "subtotal": 16883,
                "subscription_id": 28768
            }
        },
So, I am not sending timestamp. But, this is what I see in the live events pannel
Copy code
"body": {
            "JSON": {
                "conversions": [
                    {
                        "conversionDateTime": "2022-12-01 10:12:80+00:00",
                        "conversionValue": 16883,
                        "currencyCode": "EUR",
                        "orderId": "28768",
                        "userIdentifiers": [
                            {
                                "hashedEmail": "16d63c056db387b2ab955763ba33633ce765687567122fa5109c4ee4af5cf7ac",
                                "userIdentifierSource": "FIRST_PARTY"
                            }
                        ]
                    }
                ],
                "partialFailure": true
            },
            "JSON_ARRAY": {},
            "XML": {},
            "FORM": {}
        },
Check the
conversionDateTime
šŸ‘€
it’s not valid (seconds are set to
80
šŸ¤” )
If I send many time the same event for the same order, strangely, minutes are ALWAYS set to
12
(whatever the actual current time minute) and seconds are randomely set to valid or invalid values. Let me show you :
Events sent just now (111553 AM)
In the payload :
Copy code
"body": {
            "JSON": {
                "conversions": [
                    {
                        "gclid": "test",
                        "conversionDateTime": "2022-12-01 10:12:89+00:00",
                        "conversionValue": 16883,
                        "currencyCode": "EUR",
                        "orderId": "28768",
                        "userIdentifiers": [
                            {
                                "hashedEmail": "16d63c056db387b2ab955763ba33633ce765687567122fa5109c4ee4af5cf7ac",
                                "userIdentifierSource": "FIRST_PARTY"
                            }
                        ]
                    }
                ],
                "partialFailure": true
            },
            "JSON_ARRAY": {},
            "XML": {},
            "FORM": {}
        },
"conversionDateTime": "2022-12-01 10:12:89+00:00"
Hour is fine, minute is wrong (12) and seconds are wrong (89)
Now if I send the event again (same event, same order)
so
12/1/2022 11:17:28 AM
I get in the payload
Copy code
"body": {
            "JSON": {
                "conversions": [
                    {
                        "gclid": "test",
                        "conversionDateTime": "2022-12-01 10:12:77+00:00",
                        "conversionValue": 16883,
                        "currencyCode": "EUR",
                        "orderId": "28768",
                        "userIdentifiers": [
                            {
                                "hashedEmail": "16d63c056db387b2ab955763ba33633ce765687567122fa5109c4ee4af5cf7ac",
                                "userIdentifierSource": "FIRST_PARTY"
                            }
                        ]
                    }
                ],
                "partialFailure": true
            },
            "JSON_ARRAY": {},
            "XML": {},
            "FORM": {}
        },
"conversionDateTime": "2022-12-01 10:12:77+00:00"
Again, hour is fine (UTC), minutes are wrong (as I said, it’s always
12
) and seconds are wrong (
77
)
Weird right ? haha
@brief-car-34008 Oh good catch. I see another bug in the code
I now understand why I always have ā€œ12ā€ for the minutes in the different payloads I sent you
MM
is for month and because we are in december, it outputs ā€œ12ā€
In the format that is used,
MM
is used for both month and minutes
YYYY-MM-DD HH:MM:SSZ
it should be
YYYY-MM-DD HH:mm:SSZ
Actually to solve both bugs
if you check the moment.js docs
Format should be
YYYY-MM-DD HH:mm:ss.SSSZ
SS
is for fractional seconds, not seconds
ss
is for seconds
Taking your timestamp exemple above output the correct result
Copy code
> require('moment')("2022-12-01T11:17:28.999Z").format('YYYY-MM-DD HH:mm:ss.SSSZ')
'2022-12-01 12:17:28.999+01:00'
šŸ‘šŸ¼ 1
Oh we want to strip fractionnals, ok šŸ‘
šŸ™šŸ¼ 1