Closed colmtroy closed 1 year ago
@colmtroy Hi, can you please check next few lines of code?
if (eventData.lastName) mappedData.user_data.ln = eventData.lastName;
else if (eventData.LastName) mappedData.user_data.ln = eventData.LastName;
else if (eventData.nameLast) mappedData.user_data.ln = eventData.nameLast;
else if (address.last_name) mappedData.user_data.ln = address.last_name;
@kHorozhanov
aha! sorry about that :) I really should have kept reading!
What's odd is that the Stape Data tag has sent over last_name
but it's not flowing through to the capi user_data
payload
@colmtroy I think, its not working, because address should be an array address = user_data.address[0]
@kHorozhanov interesting - so the user_data payload is being generated by the Stape data client:
Screenshot of the Stape Data Tag settings
Shouldn't the Stape Data Tag then send that event data as an array?
Looking at the code again, I guess I can solve this by just sending over each value as custom event data - but it seems like the Stape Data Tag should be aligned with what the Stape FB CAPI tag expects so as to not have to do it all manually :)
thanks for your super quick replies btw :)
@colmtroy PR with the fix already merged! Thank you for your reporting 🙌
awesome thanks @kHorozhanov !
Your server side fb tag expects a
lastName
keyif (eventData.lastName) mappedData.user_data.ln = eventData.lastName;
The Stape Data Tag sends over the following event data array (note: the key in the user_data event is
last_name
notlastName
which means only
city
andemail
are currently picked up automatically