Hi there! I’m having some trouble with sending a webhook to the GA4 measurement protocol when triggered by a third-party CRM. The way it should work is that when a webhook trigger receives data, it sends POST to a GA4 endpoint. I used this to verify the validity of the body of my HTML request: Event Builder
I have filled in the correct parameters on that builder and it’s correctly triggering the conversion event in GA4 when tested from there. However, I’m having quite a hard time getting it to work on n8n. I am receiving a silent 204 which, from what I understand, means that something isn’t formatted correctly.
I have a feeling that there must be a fairly simple solution here that I’m totally missing. I’ve tried to find similar questions on here to no avail, although that’s likely because I’m not too sure what the problem is I’m novice-intermediate when it comes to my JSON knowledge and I feel like that part is formatted correctly, but I’m not sure if I need to do it differently with n8n.
I would really appreciate any push in the right direction here As for the workflow, I’ve been trying to just send static data first from this HTTP node:
{
“nodes”: [
{
“parameters”: {
“requestMethod”: “POST”,
“url”: “=https://www.google-analytics.com/mp/collect?api_secret={hidden_for_post}&measurement_id={hidden_for_post}”,
“allowUnauthorizedCerts”: true,
“jsonParameters”: true,
“options”: {
“bodyContentType”: “json”,
“fullResponse”: true
},
“bodyParametersJson”: “={\n “client_id”:”{hidden_for_post}",\n “non_personalized_ads”:false,\n “events”:[\n {\n “name”:“purchase”,\n “params”:{\n “items”:[\n {\n “item_name”:“funding”\n }\n ],\n “currency”:“USD”,\n “transaction_id”:“3642”,\n “value”:5000\n }\n }\n ]\n}",
“headerParametersJson”: “={\n “HOST”:“google-analytics.com”\t\t\t\t\n}”
},
“name”: “HTTP Request”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 1,
“position”: [
160,
560
]
}
],
“connections”: {}
}
n8n version:0.172.0 (about to go update now that I realize I’m a bit out of date but I don’t think n8n is the issue here lol)
- **Database: SQLite
- **Running n8n with the execution process [own(default), main]:own…I think?
- **Running n8n via [Docker, npm, n8n.cloud, desktop app]:Docker