Consent on Webhook

Hi, We are sending a webhook from Klaviyo to sgtm whenever we get a new lead in, and then use that webhook to trigger the Meta Lead event.

I would like to use consent in that trigger, but cant because we dont have that data with the webhook. I am storing the users consent in a cookie and sending that to the server, and then store it in Stape Store. However i am kinda stuck on the next step in terms of the whole lookup variable, because i dont know what my identifyer could be? This is the data we have from the webhook.

your identifier should be anything that your webhook and stape store record share in common. Assuming this is a Lead event, I believe the easiest thing would be email_address.

That makes sense.

What trigger should i use on the server to store the cookie in stape store? and should i just send it from web to server with a page view event?

trigger would be whichever event where email in question gets exposed to you

Yes, but what about the cookie? I need to store that in stape store. Should i send it from web to to server container wirh a pageview event? Or what would be the Best here

same answer, you want to record everything you want to record at a point where all of that is available. If let’s say you were to record click_id on page_view - that still doesn’t give you that shared, ‘stitching’ agent - email.

Also you don’t need to explicitly send a cookie, they are alrуady passed with your requests to the server container. Just pick them up with cookie value native variable.

hmm i dont really see it getting picked up on the server. I use the “Cookie value” variable on the server. I do see it on the web container tho

image


image
image

Ok, it was the cookie script itself that didnt allow it to get sent to the server - i have fixed that now.

Can i use stape user id as the document key?

if you’re going to somehow get that id to be part of the webhook - then sure