Google Analytics link click events to Airtable

Parabola Noob need a little help please. Trying to push link clicks to Airtable.

So I set up event tags on my links with Google’s Tag Manager. Works.
I just can’t figure how to put the numerical value of the event click, into the corresponding airtable field.

In image A - I want to push the number in Total Events to “IG clicks”

Send to API - My request body (just testing 3 columns)
Screenshot 2021-02-12 100728

In image B - the result of running the flow. It’s pushing the number 1 to everything.

So how can I specifically pickup the value for “instagram_link”'s Total Events - and push that to “IG clicks” value?

Or am I going about this entirely wrong?
Appreciate any help
Cheers
~James

Hey James :wave:,

It looks like the same record id exists in multiple rows. The first instance of this record has a value of 2 in the Total Events column. The other instances show the same record with a value of 1.

The “Send to an API” step sends a new request per row, so the IG clicks value of that record is being updated to 3, and then is being reprocessed as 1 in the subsequent requests.

Try using a “Filter rows” step to create multiple branches to segment your different Event Label types.

It’s likely you’re running into the same issue when calculating your total leads as well. Try using a “Sum by Group” step to sum the values in your Total Events column grouped by the Id column.

If the records already exist in your table, make a PATCH request for each event type in your JSON body.

instagram_links

{
	"id": "{id}",
	"fields": {
		"IG clicks": "{Total Events}"
	},
	"typecast": true
}

behance_links

{
	"id": "{id}",
	"fields": {
		"BE clicks": "{Total Events}"
	},
	"typecast": true
}

leads

{
    "id": "{id}",
	"fields": {
		"leads": "{Total Events}"
	},
	"typecast": true
}

Let me know if that works. If it doesn’t I might have another workaround we can try!

Hi Daniel.
Your tips put me on the right path and I got it working - thank you very much to help me see where I was going wrong.

A few gotcha’s for anyone else following. I have found using {id} in the request body throws a 422 error!
Instead adding {id} at the end of my API endpoint URL seems to work for me.

https://api.airtable.com/v0/app**************/Base/{id}

My flow. Looks complex but is just repetition and following your idea!

Thanks again mate :slight_smile:
Loving Parabola - so powerful

1 Like