Adapt user_data.adress extraction#10
Adapt user_data.adress extraction#10OphelieMicoine wants to merge 1 commit intolinkedin-developers:mainfrom
Conversation
…data.address otherwise.
|
@desaip @wyattr @SurendraJambeLI Hello ! can you consider my pull request please ? |
ZLeventer
left a comment
There was a problem hiding this comment.
Good catch — this is a real bug. The GTM data layer can pass user_data.address as either an array or a plain object depending on the tag configuration, and the current code only handles one format.
I ran into the same issue and took a similar approach in #17. One difference: my PR also adds a fallback for other address subfields (city, region, postal_code, country) using the same array-vs-object check pattern, since those can have the same inconsistency.
Might be worth coordinating to get one merged cleanly — happy to close mine in favor of this one if you expand the fix to cover the other subfields.
|
Thanks for your answer. I will cover the other fields and come back to you as soon as it is done. |
define userAddressData from user_data.address[0] if exist, from user_data.address otherwise.